-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
f2py doesn't finishing compiling #19673
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
Comments
Hello, @kconnour - can you give a little more detail? In which systems does the compilation fail? The message about removing the build directory is expected. |
Yes, I'm happy to provide as much detail as you'd like. Don't hesitate to ask. If it's helpful, this is my repo where the issue is happening (not that I expect anyone to look at it but it'd provide full context if the above code snippet is insufficient). I encounter this error when attempting to run my code on Github's CI using macos-11 and macos-10.15 runners, and a remote cluster I have access to. I'm not completely sure what other info you're after besides the OS info from the previous message, but if I run
Does this help? |
@kconnour, does this happen when using the regular CLI? e.g. |
Yes, it gives the same error; however, I think a collaborator may have found the problem. If I run the aforementioned code directly from a Bash script, I get this message:
The error completely goes away if python3.9-dev is installed, so the error may not be with f2py but with my system configuration. If I do need dev tools installed to use f2py, it would be nice if that was included with the documentation (or perhaps I just missed that detail, which is entirely possible). |
Development headers should be installed for working with compiled extensions :) also now deprecated by #24532. |
I have some FORTRAN code that I want to combine into a .so file and import with Python. I wrote a script that does that as part of
setup.py
. This script works on some computers but not others. When it fails, f2py appears to go through the entire compilation process and prints a command-line command, but it seems this command is never executed. If I manually execute this command, the compilation succeeds.The build works on my Ubuntu 20.10 and macOS 10.15.7 computers but fails on macOS 11, but I'm not convinced this is an OS issue. In all cases I'm using gfortran from gcc 10.2.0.
Reproducing code example:
I can't give the full code without my fortran modules but this is the key f2py line.
Error message:
None. Regardless of whether or not the build succeeds, f2py outputs something like the following near the end of its output:
On some computers, f2py won't have generated a .so file. However, in every instance that this happens, if I simply copy the above command and paste it into Terminal and execute it, it does create the .so file. When it does create the .so file (without my manual intervention) I do also get a line like the following:
NumPy/Python version information:
1.20.2 3.9.5 (default, May 7 2021, 21:28:16)
[Clang 12.0.5 (clang-1205.0.22.9)]
The text was updated successfully, but these errors were encountered: