Last active
February 26, 2020 18:56
-
-
Save heaversm/af52abdd9f0bc8d3d3937894edf5dc52 to your computer and use it in GitHub Desktop.
Frequently used python commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pyenv | |
#have pyenv manage versions: | |
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile | |
#activate changes: | |
source ~/.bash_profile | |
#install particular versions | |
pyenv install X.X.X | |
#list installed pyenv versions | |
pyenv versions | |
#set a local (current directory) python version | |
pyenv local 3.x.x | |
#or set a global version | |
pyenv global 3.x.x | |
#list current python version | |
python -V | |
#set python3 as default: | |
#first, list python versions... | |
ls -l /usr/local/bin/python* | |
#then choose one and create an alias | |
ln -s -f /usr/local/bin/python3.7 /usr/local/bin/python | |
#then restart terminal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment