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

Force usage of Python 3 #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

theel0ja
Copy link

@theel0ja theel0ja commented Jan 9, 2020

On Debian10, python automatically points to Python 2.

Fixes #14 as well.

@joohoi
Copy link
Owner

joohoi commented Jan 10, 2020

Thanks for the pr!
However, I'm not sure how to handle this the best way. I'd think it would be the best practice to let the distribution itself define the default version of Python to use, this is also in order to keep the script distribution agnostic. It is compatible with both Python 2 and 3 anyway.

What do you think?

@Daniel15
Copy link

Daniel15 commented Jul 3, 2020

I'd think it would be the best practice to let the distribution itself define the default version of Python to use

Newer Debian versions only have Python 3 installed out-of-the-box:

daniel@ny02:~$ python --version
-bash: python: command not found
daniel@ny02:~$ python3 --version
Python 3.8.3

So the shebang currently in this script doesn't work properly.

Since Python 2 is EOL and everyone should be migrating to Python 3, IMO it makes sense to change the shebang to hard-code python3.

@mmiller7
Copy link

Just found this because even though latest Ubuntu has python2.7 they took out the python-requests 2.7 package...couldn't figure out if/how to make this run with python3 so I had to do a hacky fix to the imports :/

@benthetechguy
Copy link

Newer Debian versions only have Python 3 installed out-of-the-box:

daniel@ny02:~$ python --version
-bash: python: command not found
daniel@ny02:~$ python3 --version
Python 3.8.3

This can be solved by installing the python-is-python3 package.

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

Successfully merging this pull request may close these issues.

Python 2.7 EOL
5 participants