Closed onewhaleid closed 5 years ago
Which compilers did you use to build the extension for Python 3.7 on Windows? Would it be possible to build it using static linking so that we don't need to actually install the compilers to use the package?
I haven't been able to import your etpred
extension for Python 3.7 and Windows yet on my system. I always end up with the following error:
ImportError: DLL load failed: The specified module could not be found.
I used f2py
to create the windows DLL. I think it used mingw.
@hydrogeoscience knows more about FORTRAN compilers than I do.
Ok thanks
Using your branch, I haven't been able to run pygtide
successfully on Python 3.7 yet. I'm missing some shared libraries and it is difficult to know which one without knowing exactly which compilers were used to build the extension (f2py
can be used with different compilers). I'll still continue to investigate and report back if I succeed.
However, I'm a able to run it in Python 3.6. Looking at the difference of size of the etpred
extensions for Pythons 3.6 and 3.7, my guess is that the 3.6 one was compiled with some flags to statically link some of the libraries. So that is why it is working in 3.6 and not in 3.7.
As I have mentioned, in Issue #3, the best would be to provide the modified ETERNA PREDICT Fortran source code (if this is possible) so that it would be possible to compile the etpred
extension with python setup.py build_ext
instead of distributing the compiled extensions along with the source code.
Hi, I tried to run your branch of pygtide on Linux with conda installed Python 3.6.
First I created symlinks for the files in commdat folder, because the file names seem to be hardcoded with windows path separators in the fortran code:
for file in `ls commdat`
do
ln -s commdat/$file commdat\\$file
done
The initialization pt = pygtide.pygtide()
was successful with this hack.
Unfortunately, now it errors at the pt.predict()
call:
$ python test.py
ETERNA PREDICT v3.4 (10/02/2013) is calculating, please wait ...
At line 421 of file etpred.f90 (unit = 11, file = '�<�&�~')
Fortran runtime error: File 'NUL' does not exist
Do you have an idea what is going wrong?
Hello, thanks for your interest. Yes, this has been optimised for Windows only. I am working on a Linux and Mac OS version.
:thumbsup: Thanks for your efforts.
Fyi, I got one step further, by creating another symlink from NUL to /dev/null (this could be fixed in the source by a precompiler).
Now, there is another problem:
ETERNA PREDICT v3.4 (10/02/2013) is calculating, please wait ...
corrupted size vs. prev_size
Aborted (core dumped)
Edit: If the arguments passed to pt.predict are changed in test.py it's working for me now.
This pull request makes pygtide an installable package, using:
or simply
Windows DLLs for python 3.7 have been added, along with Linux and Mac OS shared objects for python 3.6 and 3.7.
File paths have been updated to make them platform independent.