Boost logo

Boost Users :

Subject: Re: [Boost-users] importing boost-python module in python on windows
From: Seema Jaisinghani (Seema.Jaisinghani_at_[hidden])
Date: 2009-06-19 19:53:54


Hi,

I found that it was a version mismatch problem. I was using Python 2.6 and boost 1.37. Even though the boost-python project compiled with python 2.6 and the module was created without any errors. When I used the module within python 2.6, it was looking for python25.dll

Rebuilding with 2.5 fixed the problem.

Thanks,
Seema

-----Original Message-----
From: boost-users-bounces_at_[hidden] [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Nat Goodspeed
Sent: Monday, June 15, 2009 7:41 AM
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] importing boost-python module in python on windows

Seema Jaisinghani wrote:

> Thanks for the response. Simply changing the name of the extension .dll to .pyd does not help.
>
> ImportError: DLL load failed: The specified module could not be found.
>
> It is not a path problem, as another module in the same location can be imported correctly.

That would have been my next suggestion. What's the full filename of the
other module? Is it a Python module or another extension module?

Does your extension module depend on any other .dlls (not Python
extensions)? Where are they stored?

In a previous product, we had to set both PYTHONPATH and PATH:
PYTHONPATH to direct the interpreter to our extension modules, PATH to
direct the OS to the DLLs on which our extension modules depended.

> I am building the boost_extension_module in Visual Studio IDE.
> Is there a way to output a pyd directly, instead of dll?

I'm sure there is, but I don't have a Windows machine handy just now.
Poke around in the project's Properties panes.

> What else is required to let Python know about boost_python libs?

That should be all.

The Python interpreter knows nothing about Boost.Python. The
Boost.Python library simply automates construction of the interface data
required for any Python extension module. The classic approach was to
hand-code it. If you were having trouble with that interface data, you'd
get an entirely different error message.
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net