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

Fix python shebang #556

Closed
EricBelanger opened this issue Nov 27, 2012 · 5 comments
Closed

Fix python shebang #556

EricBelanger opened this issue Nov 27, 2012 · 5 comments

Comments

@EricBelanger
Copy link

@EricBelanger EricBelanger commented Nov 27, 2012

The python shebang at the begining of the files:

!/usr/bin/env python

should be changed to:

!/usr/bin/env python2

as recommended in PEP 394[1]. This change will make youtube-dl work out of the box on distros like Arch Linux where python is a symlink to python3. Currently, I need to unzip the python archive, change the shebang and rezip everything which is messy.

Thanks.

[1]http://www.python.org/dev/peps/pep-0394/

@phihag
Copy link
Contributor

@phihag phihag commented Nov 27, 2012

I'd rather implement #180, but leaving this open while #180 is yet unresolved...

@rg3
Copy link
Collaborator

@rg3 rg3 commented Nov 27, 2012

Note: I do seem to have python2 symlinked in my Slackware machine, but take into account the "python2" link is only made by default in Python 2.7. This could be a problem for people running Python 2.6.

@EricBelanger
Copy link
Author

@EricBelanger EricBelanger commented Nov 27, 2012

I just realised that the python2 symlink is added manually in the package so you need to assume that other distros are doing the same. So changing the shebang might introduce breakage in other distros depending how they handle the python2 and python3 co-existence.

I agree that adding python3 support would be the best solution here for everyone.

@phihag
Copy link
Contributor

@phihag phihag commented Nov 28, 2012

At least the youtube IE should work now with Python 3, so I'm closing this issue.

@corlaez
Copy link

@corlaez corlaez commented Apr 26, 2020

Ubuntu 20.04 has python3 installed but python is not defined. If you don't want to modify any config you can make it work with:

python3 $(which youtube-dl)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.