You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been wondering for a while in the fields of pybind11 and finally decided to ask for some help. I'm trying to build a python module, as you might expect, to encapsulate a small lib a compiled in VS, using three libraries (QuantLib, QuantExt and LIBPQXX, all of them statically linked). The library compiles fine.
I followed the instructions pybind11's site and also building using the python setup.py build everything works (at least in the building sense).
The thing is that when I try to run the installed module in python I get an ImportError saying a DLL can't be found. For some unknown reason, building the module with a conda enviroment that I have, with many other unrelated modules installed, works. But when I try to build it with a new enviroment (in a different python version), fails to import.
The first thing I did was using a dependency walker to get a peak into de .pyd file, but I think most of these files are found when the module is run in the conda envieroment since conda adds some paths to the PATH env variable that have thouse dlls:
Then, I thought that maybe the problem was that setup.py was changing the name of the module (the name of the module should be curvemanager), and that was the reason why it worked in the old conda envieroment (for py37 env keeps the name) and not in the new one (py310 changes the name):
So I changed the file's names manually, but it didn't work.
Lastly, I tried moving some dlls manually. I know that LIBPQXX uses some dlls in order to run, but I pasted all of them in the folder with no luck.
I'm running out of ideas, so any help is very appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi to all!
I've been wondering for a while in the fields of pybind11 and finally decided to ask for some help. I'm trying to build a python module, as you might expect, to encapsulate a small lib a compiled in VS, using three libraries (QuantLib, QuantExt and LIBPQXX, all of them statically linked). The library compiles fine.
I followed the instructions pybind11's site and also building using the
python setup.py build
everything works (at least in the building sense).The thing is that when I try to run the installed module in python I get an ImportError saying a DLL can't be found. For some unknown reason, building the module with a conda enviroment that I have, with many other unrelated modules installed, works. But when I try to build it with a new enviroment (in a different python version), fails to import.
The first thing I did was using a dependency walker to get a peak into de .pyd file, but I think most of these files are found when the module is run in the conda envieroment since conda adds some paths to the PATH env variable that have thouse dlls:
Then, I thought that maybe the problem was that setup.py was changing the name of the module (the name of the module should be curvemanager), and that was the reason why it worked in the old conda envieroment (for py37 env keeps the name) and not in the new one (py310 changes the name):
So I changed the file's names manually, but it didn't work.
Lastly, I tried moving some dlls manually. I know that LIBPQXX uses some dlls in order to run, but I pasted all of them in the folder with no luck.
I'm running out of ideas, so any help is very appreciated.
Beta Was this translation helpful? Give feedback.
All reactions