-
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
Problem with building the python interface #92
Comments
I'm getting the same issue. I have tried using Visual Studio 2019 and now 2022 but both give the same error. CMake command:
Most of the build goes fine, but I get this warning:
Then after installing etc I get the same import message mentioned above when trying to import PyNomad. Installation has gone fine on my MacOS and Linux machines, only the Windows machine is causing issues. |
I am having the same issue. I run the following:
and when I try to import it (by extending my PYTHONPATH to include the PyNomad folder), I get the error @flotang-gtt posted. |
I don't have a PYTHONPATH variable but I have the path to Nomad libraries directory (c:/Users/ctribes\Documents\GitHub\nomad\build\release\bin in my case) in the %PATH% variable. When building Nomad with Python interface I don't see any mention of PyNomad.so. The build process creates an PyNomad.cp38-win_amd64.lib and PyNomad.cp38-win_amd64.exp. From that, a PyNomad.cp38-win_amd64.pyd files is created and copied into the .....\AppData\Roaming\Python\Python38\site-packages. The pyd file is the dynamic link library loaded with doing the import PyNomad in Python shell for windows. This library calls for libnomad dlls upon running. Hence, the nomad libraries directory must be in the %PATH%. |
Hi,
when following the directions from https://nomad-4-user-guide.readthedocs.io/en/latest/LibraryMode.html#pynomad-interface, in combination with the info in the readme of the python interface (there's a bit of a difference between these two, fyi, in the online version, the quite necessary
--config Release
option, without which the build fails when linking), a .pyd file is generated and an .egg is put into the site-packages, everything seemingly working fine.However, importing with pynomad does not work:
ImportError: DLL load failed while importing PyNomad: The specified module could not be found.
Given the instructions mentioned above are working with the "old" msvc versions, it may be relevant that I tried it using
-G"Visual Studio 17 2022"
which does not support an [Arch] option because w32 is deprecated (I think).Any hints?
The text was updated successfully, but these errors were encountered: