Skip to content
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

Shebang of euler2 #15

Open
rodenhausen opened this issue Jan 19, 2017 · 3 comments
Open

Shebang of euler2 #15

rodenhausen opened this issue Jan 19, 2017 · 3 comments

Comments

@rodenhausen
Copy link

I want to suggest to changing shebang from #!/usr/bin/env python to #!/usr/bin/env python2

#!/usr/bin/env python2 makes explicit which version is required. Users with a setup of both python2 and python3 have a choice whether they want to link their python to python2 or python3

@rodenhausen
Copy link
Author

Same issue in other executables such as y2d

@ludaesch
Copy link
Member

I like the idea to make it explicit that we require Python2 rather than Python3. And it seems the change has been made, but now I get a new problem: python2 isn't found!

I tried to create a symlink, but that didn't work either. What's the right way to create an executable python2 command for euler2? See below for my unsuccessful attempts:

[EulerX :)]$ euler2
env: python2: No such file or directory
[EulerX :(]$ which python
/usr/bin/python
[EulerX :)]$ ln -s /usr/bin/python /usr/bin/python2
ln: /usr/bin/python2: Operation not permitted
[EulerX :(]$ sudo ln -s /usr/bin/python /usr/bin/python2
Password:
ln: /usr/bin/python2: Operation not permitted
[EulerX :(]$ python3
bash: python3: command not found
[EulerX :(]$ python2
bash: python2: command not found
[EulerX :(]$

@rodenhausen
Copy link
Author

Instead of a link, try creating a bash script python2 that forwards to the python binary.

#!/bin/bash
exec /usr/bin/python "$@"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants