Skip to content

Instantly share code, notes, and snippets.

@avoidik
Created July 1, 2017 16:47
Show Gist options
  • Save avoidik/e336931ed8ff8f164c81329ae80ebd49 to your computer and use it in GitHub Desktop.
Save avoidik/e336931ed8ff8f164c81329ae80ebd49 to your computer and use it in GitHub Desktop.
pyenv
# make sure to have these libs to compile Python with
sudo apt install -y libssl-dev openssl zlib1g-dev sqlite3 libsqlite3-dev libbz2-dev bzip2

# download pyenv
git clone https://github.com/pyenv/pyenv.git ~/.pyenv

# put it in your path and initialize it, in .bashrc for example
export PATH="${HOME}/.pyenv/bin:${PATH}"
eval "$(pyenv init -)"

# now install all the versions you need (it can indeed take some time)
pyenv install 3.5.3
pyenv install 3.6.1
pyenv install 3.7-dev

# and last but very important step, run this once:
pyenv global system 3.5.3 3.6.1 3.7-dev
# the order is important, list all the installed versions you want to use
# thanks to that, tox will find all the executables
# "system" should always be first so we keep normal behavior when not in a virtualenv
@avoidik
Copy link
Author

avoidik commented Jul 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment