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 run.sh to use python2 #3662

Closed
wants to merge 1 commit into from
Closed

Conversation

BriceSD
Copy link
Contributor

@BriceSD BriceSD commented Aug 11, 2016

Short Description:

Force run.sh to use python2

@mention-bot
Copy link

@BriceSD, thanks for your PR! By analyzing the annotation information on this pull request, we identified @simonsmh, @03t02 and @mjmadsen to be potential reviewers

@simonsmh
Copy link
Contributor

Great. I meet the same problem on some platform like termux which use python3 as default. Please tell me that every other platform support it. btw setup.sh need this improvement too.

@douglascamata
Copy link
Member

Use virtualenv. Nobody is supposed to have the same python2 executable.

@elicwhite
Copy link
Contributor

@douglascamata What do you want to do with this? I acknowledge that there is a problem where people are having it be run with python3 on their machines. We need to figure out something that is going to work easily for people.

Is python2 ever not installed when people install python?

@simonsmh
Copy link
Contributor

@TheSavior I meet the same problem on some new platform like termux which use python3 as default. You have to install and use python2 which is very strange.

@ localhost in ~ [16:16:07]

$ python --version
Python 3.5.2

@ localhost in ~ [16:16:33]

$ python2 --version
Python 2.7.12
If every platform support to execute python2 , it is necessary. I don't have mac but this worked on Ubuntu/Debian/Centos.

@douglascamata
Copy link
Member

@TheSavior it depends on how you install Python. By forcing the script to use a python2 executable you're restricting the way people can install Python. Python compiles by default to python executable, so we should use it. A simple code can be added to bot's initialization to identify the Python version and exit with a warning is on Python 3.

@BriceSD
Copy link
Contributor Author

BriceSD commented Aug 12, 2016

@douglascamata Oh I see, thought you could call python2 like this regardless of your install.
setup.sh doesn’t do a source bin/activate on an install, it does it only on updates. I guess this is what we should change.

Edit : nvm it does. Not sure why I have to do it manually after an update while using the script though.

@simonsmh
Copy link
Contributor

@BriceSD you are using pip3
run pip2 install -r requirements.txt instead

@douglascamata
Copy link
Member

@BriceSD I'm closing this because changing the python executable to python2 is not acceptable.

@BriceSD BriceSD deleted the fix/force-python2 branch August 12, 2016 18:57
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.

5 participants