8000 f2py CLI configuration problem · Issue #5834 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

f2py CLI configuration problem #5834

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

Closed
ckald opened this issue May 4, 2015 · 4 comments
Closed

f2py CLI configuration problem #5834

ckald opened this issue May 4, 2015 · 4 comments

Comments

@ckald
Copy link
ckald commented May 4, 2015

I tried today to compile a small fortran code for my python modules and encountered the following problem (Python 2.7.9, OS X 10.10.3, Numpy 1.9.2):

(env)➜  pyBBN  f2py
zsh: /Users/b/Repositories/BBN/pyBBN/env/bin/f2py: bad interpreter: /Users/travis/build/MacPython/numpy-wheels/venv/bin/python: no such file or directory

This happened both with virtualenv numpy and system one. python -c "from numpy import f2py; f2py.test()" worked fine.

I had to edit the /Users/b/Repositories/BBN/pyBBN/env/bin/f2py to replace the weird shabang to be #!/usr/bin/env python. Now f2py executes fine

@charris
Copy link
Member
charris commented May 4, 2015

This is may have been addressed by #5815, but @matthew-brett I think the form #!/usr/bin/env python is preferred for portability.

@matthew-brett
Copy link
Contributor

The form #!python is for setuptools to know it should replace the shebang line when installing into - say - a virtualenv. I believe - from some experiments I just did - that setuptools will leave #!/usr/bin/env python as it is when installing the script, but will change #!python to point to the path of the installing Python.

I realize now I think about it, I don't know what happens on Windows - to make f2py callable as a command - I wonder if it has been tested after installing into a virtualenv.

@charris
Copy link
Member
charris commented May 5, 2015

I made a comment on your new PR. Whatever works is probably the principle here.

@seberg
Copy link
Member
seberg commented May 4, 2019

Sounds like the linked PR above should have fixed it (and it is a very old f2py build related issue, that would have come up again otherwise).

@seberg seberg closed this as completed May 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
0