-
Notifications
You must be signed in to change notification settings - Fork 43
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
Uncomplete installation #47
Comments
Hi! Yes, it can be a bit tricky. It seems like you have managed to install it since you are able to I would start to look in the wafo installation and compare it to the files/folders here at github. All .py files and all folders except Could you give some more information about how exactly you installed it? Did you create a wheel? Which Python version do you use? |
I use python 3.7.6 with anaconda... but i can move to another python if needed. I did some progress restarting from the beginning (I use to have a wafo folder inside of my site-package/wafo folder. Now it's better. But still meet problems with wheel. First command python setup.py bdist_wheel "failed with intfcmod.o" And when I test it, i get error messages (see the test notebook). https://www.dropbox.com/s/lzgyaf6guyy136m/test.ipynb?dl=0 It might come from the use of gfortran ? |
I get about the same number of errors and failures when running |
In #48 a revised installation and compilation process is being worked on. |
Dears,
If pywafo is macOs compatible could you suggest me a fortran compiler? |
I have struggled to compile the fortran files in wafo with gfortran on windows for many years. For mac-os I have no idea if pywafo compiles. In theory it should. Maybe you can find some pointers here: |
@pbrod Do you need to build and include OpenBLAS to make the fortran files to compile? After cloning the pywafo master, I followed that guide you linked to (almost, the differences are marked in bold):
The final build command still needs to be run 3 times. After that however a wheel is created under dist, and these DLLs are placed in the But the DLLs can't be found by wafo ( import os
_dll_dir = os.path.join(os.path.dirname(__file__), '.libs')
if os.path.isdir(_dll_dir):
os.environ['PATH'] += os.pathsep + _dll_dir Adding that, building again, reinstalling wafo. |
I don't think you neeed to build OpenBLAS. For me it works without it.
To build the wheel I just do (in the same powershell window and at the pywafo root):
Then move to the dist subfolder and
After the install, all the "XXXX.pyd"-files should be located in the To test that everything works you could open up an ipython window and do:
The output should give 186 tests passed, 1 skipped and 149 warnings. |
Thanks for the walk-through! I think I installed mingw-64 (with gfortran) properly after realizing I should run this in the MING64 prompt (which was not at all obvious to me)
When running
I don't understand where this option is set but I will continue my attempts when I get more time. With the wheel I built and installed before (using tdm-gcc 64 instead of mingw-w64) I do get the 5 .pyd files in the installation root Anaconda3\Lib\site-packages\wafo\ (c_library, mvn, mvnprdmod, rindmod and cov2mod) and the dlls in Anaconda3\Lib\site-packages\wafo\.libs\ . At |
I think I used pacman -S mingw64/mingw-w64-x86_64-gcc-fortran on my installation that works. My gcc and gfortran versions are: You may also check out these pages on how to compile fortran on windows: |
Hi all, The former is odd, since the temp directory is added to the library search paths, and Any suggestions as to where to investigate next? I'm using the following: |
I just tried to build wafo again and got the C and Fortran extensions to work on Windows 10. Once again I downloaded MSVC++ build tools from https://visualstudio.microsoft.com/visual-cpp-build-tools/ and mingw64 (with gfortran) from https://www.msys2.org/. I added C:\msys64\mingw64\bin to the environment variable PATH. I create a fresh environment using conda like this
Then I navigate to wafo's setup.py and run One remaining installation problem is that the dll files containing the compiled Fortran code are not placed in the root of wafo, but rather in wafo/.libs so they can not be found by Python. import os
_dll_dir = os.path.join(os.path.dirname(__file__), '.libs')
if os.path.isdir(_dll_dir):
os.environ['PATH'] += os.pathsep + _dll_dir However with Python 3.10 I still get warnings that all Fortran extensions can not be found. I have tried to build again with the exact same set of packages and versions (numpy 1.21.2 btw) in both Python 3.9.12 and 3.10.4. In 3.9 it works and in 3.10 it doesn't... |
Solved. Searching 'dll' in Python's changelog lead me to Adding it to %PATH% with Read more here if you're interested |
Hi community,
I'm a new user of pywafo and have met difficulties to install it. It seems to be a classical issue for windows users (#43).
Following instructions given by @morbult in #43, I progress trough steps of the installation but it doesn't seem to work.
Commands "import wafo" and "import wafo.data as wd" work without issue
BUT commands :
"import wafo.spectrum.models as wsm" returns ModuleNotFoundError: No module named 'wafo.spectrum'
"import wafo.objects as wo" returns ModuleNotFoundError: No module named 'wafo.objects'
"import wafo.misc as wm" returns ModuleNotFoundError: No module named 'wafo.misc'
"import wafo.stats as ws" returns ModuleNotFoundError: No module named 'wafo.stats'
"import wafo as wf
wf.test(coverage=True, doctests=True)" returns AttributeError: module 'wafo' has no attribute 'test'
What's wrong with my installation? How can I fix it?
Alexis
The text was updated successfully, but these errors were encountered: