-
Notifications
You must be signed in to change notification settings - Fork 32
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
fortranmagic should call f2py3 under Python 3 #9
Comments
Hey @vallism, you are right, thanks for the report. This bug was introduced after #8 . Before that, instead to run the command I'm not sure if the better idea is to undo that change and handle the Window's problem it fixes with a different approach, or make the call to the proper For the latter, I'm not sure if append the python version would be enough. For example, in my computer (w/ubuntu) I have these:
but is this common to any system/os? |
This may be a question for the numpy.f2py developers. I looked in their github, and there's no mention of f2py3, so I suspect that it may be something that packagers add. On my anaconda Python 2.7 + 3.4 installation on OS X, I have f2py under the main /bin directory, and f2py3 under the python 3 sub-environment. On my homebrew Python 2.7 + 3.4 installation, I have only f2py2.7 in /usr/local/bin; the pip-installed numpy creates f2py for both Python 2.7 and 3, but with the wrong hash-bang... Basically, it's all over the place. Perhaps you could do the awkward thing, and call f2py.main on anything else than windows. Another solution, less transparent to the user but still OK IMHO, would be to allow selecting the f2py executable in the iPython magic. |
Maybe the great numpy's maintainers @charris or @juliantaylor can help us: Is there a multiplatform python2/3 compatible way to run f2py programatically (i.e from Python) ? |
should just be the f2py binary is just a wrapper around |
no idea why it originally doesn't work for windows directly from python. that would be interesting to figure out but i have no windows. |
too bad doesn't work, but added numpy/numpy#5565 |
I just checked and replacing the |
Otherwise it will silently use an f2py that may have a hardcoded #!/usr/bin/python27 at the top, resulting in puzzling errors because the compiled objects look at the wrong Python includes.
The text was updated successfully, but these errors were encountered: