Created
March 17, 2021 11:23
-
-
Save mttmantovani/a8b820a9ccc673f6ec7265d234000635 to your computer and use it in GitHub Desktop.
Install pyenv on Ubuntu 20.04
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
#!/bin/bash | |
sudo apt-get install git python3-pip python-is-python3 make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev curl libffi-dev | |
pip install virtualenvwrapper | |
git clone https://github.com/pyenv/pyenv.git ~/.pyenv | |
git clone https://github.com/pyenv/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv | |
git clone https://github.com/pyenv/pyenv-virtualenvwrapper.git ~/.pyenv/plugins/pyenv-virtualenvwrapper | |
cat << EOF >> ~/.bashrc | |
export PYENV_ROOT="$HOME/.pyenv" | |
export PATH="$PYENV_ROOT/bin:$PATH" | |
if command -v pyenv 1>/dev/null 2>&1; then | |
eval "$(pyenv init -)" | |
fi | |
export PYENV_VIRTUALENVWRAPPER_PREFER_PYENV="true" | |
export WORKON_HOME=$HOME/.virtualenvs | |
eval "$(pyenv virtualenv-init -)" | |
pyenv virtualenvwrapper_lazy | |
EOF | |
exec $SHELL | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment