-
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
pywafo can not be compiled on windows #26
Comments
The mingw toolchain to compile the fortran extensions in pywafo on windows is broken at the moment. However, it is possible to compile only the c-extensions with a microsoft compiler. To make sure you use the microsoft compiler you can try this: [build] You can then try to run the following in a dos-prompt: If that does not work you can go to "c:\wafo\source\c_library" folder and run the following in a dos-prompt: python build_all.py and the manually copy the c_library.pyd file to the "c:\wafo" folder. |
Hi Per, Thank you very much for your reply. I have the feeling that I am getting I did what you told me (adding the distutils.cfg with compiler=msvc (btw: Anyway, the first command does not work The second one with python build_all.py give the log as in the log.txt file Errors start to be raised from Building import library (arch=AMD64): I read somewhere on a mingw side that the libpython27.a should be generated Would you have a clue to fix this ? Any hints appreciated! Regards 2016-06-24 14:57 GMT+02:00 Per A. Brodtkorb notifications@github.com:
running build found f2py in: C:\Apps\Anaconda\Anaconda250\Scripts\f2py.pycompiling c_codes |
Hi Per, Excellent, I fixed this problem. I was able to compile the Then I did the following command :
This runs but end with an error message
Anyway, still the c_library.pyd was created.
However, I I just copy the So altough the setup script is not working out of the box, I could finally fix it, which is a releave Thanks for the help ! If you want I have an exampe rain_flow_example.py script which I added to the tutorials which is using this cycle_astm algorithm Regards |
For those interested. Using the same trick as above I was able to compile pywafo for python 3.5.3 as well. For this, I had to first update the Microsoft visual C++ compiler to version 15.0, which can be downloaded from here For the fortran compiler I installed MinGW version 5.3.0-3 and used the gfortran.exe coming with this. Then I ran: This fails at the end with the same message as above, but again, if you copy the c_library.pyd from the build to the wafo directory you should be able to run pywafo including the rainflow algoritm. Attached an updated version of the rain_flow example. |
I have used the latest version of pywafo. I need to have the compiled version since I need the cylce_astm routine. In order to compile the libary I have run
python setup.py bdist_wheel -d build
I have both the mingw compiler and the microsoft visual studio C++ compiler installed, but I can not find how to choose which version should be used and even can not see which version is being used.
I get an error message related to not be able to read the python27.dll
I have included the total outpyt to the log.txt file.
Key message I think is the first warning saying:
Building import library (arch=AMD64): "C:\Apps\Anaconda\Anaconda250\libs\libpython27.a" (from C:\Apps\Anaconda\Anaconda250\python27.dll)
objdump.exe: C:\Apps\Anaconda\Anaconda250\python27.dll: File format not recognized
Traceback (most recent call last):
File "setup.py", line 83, in
setup_package_pyscaffold()
etc.
File "C:\Apps\Anaconda\Anaconda250\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 276, in generate_def
raise ValueError("Symbol table not found")
ValueError: Symbol table not found
so somehow the python27.dll is not recognised, which I though was related to the mingw compiler.
The question is: how can I fix this or how can I ensure that the CL compiler (msvC++) is used ?
Hopefully you can help me!
Regards
Eelco
log.txt
The text was updated successfully, but these errors were encountered: