-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PyNomad Import Error in Python>3.6 #151
Comments
It should work with Python version > 3.6. Nothing special is required. Something that can go wrong is the path where Nomad libraries are located. Here are some checks that I did on my computer. Please note, the last element in the %PATH% variable, this is where the Nomad libraries have been put when building with mingw tools (it will be different for Visual Studio). |
There are several tricky things when building/import PyNomad. One is the compatibility between the compiler and the Python version. For example, in my case (OSX), I have (base) christophe@Fol-de-Dol nomad4dev_Copy2 % python So I need to build nomad with Clang. But the right architecture must be selected ('arm64' or 'x86_64'). I can force x86_64 by adding a build flag like -DCMAKE_OSX_ARCHITECTURES=x86_64 when configuring with cmake. |
When importing PyNomad in Python is not working another option exists. Nomad can optimize on a Python blackbox without using the PyNomad interface in batch mode (see user guide). bb.py
|
That is a good solution, thanks for the help, I have tried with VS17 and VS16 and two different PCs. I identified at least one potential problem related to |
Visual Studio 15 works for me when building PyNomad. |
Has someone found the causes of this problem? I am using Visual Studio 2022 as a complier, and Python 3.10.12. It produces this error message when importing PyNomad from Python. I used DependenciesGUI to find the missing DLL but no one of them seems missing. The path should be correct since i can correctly call nomad from my CMD. Furthermore, I checked the architecture and it is correct AMD64, both in the .pyd and in my computer Thank you in advance! |
The building procedure has changed for release v.4.4.0. Maybe it can help solving the problem. |
I have tested PyNomad successfully with Python 3.6 but when I try to install it in Python version >3.6 I get the following error after installing it when trying to import the PyNomad library.
import PyNomad
ImportError: DLL load failed while importing PyNomad: The specified module could not be found.
Is there is any workaround to make it work in Python version >3.6?
Thanks in advanced.
The text was updated successfully, but these errors were encountered: