Skip to content

Instantly share code, notes, and snippets.

@sansal54
Forked from jmvrbanac/install_pyenv.sh
Last active April 12, 2022 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sansal54/3da6d5451e21f9f1b7bbb5aa0a7a305e to your computer and use it in GitHub Desktop.
Save sansal54/3da6d5451e21f9f1b7bbb5aa0a7a305e to your computer and use it in GitHub Desktop.
Install pyenv on Ubuntu
sudo apt-get install git python3-pip make build-essential libssl-dev libffi-dev python-is-python3 zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev curl
sudo pip3 install virtualenvwrapper
git clone https://github.com/yyuu/pyenv.git ~/.pyenv
git clone https://github.com/yyuu/pyenv-virtualenvwrapper.git ~/.pyenv/plugins/pyenv-virtualenvwrapper
git clone https://github.com/pyenv/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
echo 'pyenv virtualenvwrapper' >> ~/.bashrc
exec $SHELL
and check if it is installed :
pyenv --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment