|
Boost Users : |
Subject: Re: [Boost-users] importing boost-python module in python on windows
From: Nat Goodspeed (nat_at_[hidden])
Date: 2009-06-15 10:41:15
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 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