Python extension for Windows failing on import

View: New views
3 Messages — Rating Filter:   Alert me  

Python extension for Windows failing on import

by Chang Glasgow :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi folks,

I'm attempting to build a Python extension and seem to be running
repeatedly into a wall.

The module compiles and links successfully, but attempting to import from
a Python script kicks out the following error:

  ImportError: DLL load failed: The specified module could not be found.

I'm using Boost 1.4 and Rapidmind 4.0.  I've attempted building from the
sample project provided by python.org, and from the quickstart sample
provided by boost, always to the same result.

Thanks,


Chang
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@...
http://mail.python.org/mailman/listinfo/cplusplus-sig

Re: Python extension for Windows failing on import

by Nathan Osman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Have you ensured that all paths are set up properly? (Can Python find your module?) Also, does your module have the right extension?

- George

> Date: Fri, 6 Nov 2009 13:40:42 -0500
> From: czg@eyesee360.com
> To: cplusplus-sig@python.org
> Subject: [C++-sig] Python extension for Windows failing on import
>
> Hi folks,
>
> I'm attempting to build a Python extension and seem to be running
> repeatedly into a wall.
>
> The module compiles and links successfully, but attempting to import from
> a Python script kicks out the following error:
>
> ImportError: DLL load failed: The specified module could not be found.
>
> I'm using Boost 1.4 and Rapidmind 4.0. I've attempted building from the
> sample project provided by python.org, and from the quickstart sample
> provided by boost, always to the same result.
>
> Thanks,
>
>
> Chang
> _______________________________________________
> Cplusplus-sig mailing list
> Cplusplus-sig@python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig


Windows Live: Make it easier for your friends to see what you’re up to on Facebook.
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@...
http://mail.python.org/mailman/listinfo/cplusplus-sig

Re: Python extension for Windows failing on import

by Chang Glasgow :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The module is built as _somemodule.pyd, located in the same directory as
the test script which attempts to import with the following line:

from _somemodule import *

This works in the case of the trivial examples, at least.

It also occurs to me that I should mention that I'm using Python 2.6.4.
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@...
http://mail.python.org/mailman/listinfo/cplusplus-sig