Skip to content

Instantly share code, notes, and snippets.

@crankycoder
Last active May 27, 2021 02:48
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 crankycoder/27894576d9b697ab4ed851b409156ac1 to your computer and use it in GitHub Desktop.
Save crankycoder/27894576d9b697ab4ed851b409156ac1 to your computer and use it in GitHub Desktop.
Setup pyenv for ubuntu 20 distros
#!/bin/bash
sudo apt-get install git python-is-python3 python3-pip make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev curl
sudo pip install virtualenvwrapper
# Official pyenv repos are under github.com/yyuu
git clone https://github.com/yyuu/pyenv.git ~/.pyenv
git clone https://github.com/yyuu/pyenv-virtualenvwrapper.git ~/.pyenv/plugins/pyenv-virtualenvwrapper
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(pyenv init --path)"' >> ~/.zshrc
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
echo 'pyenv virtualenvwrapper' >> ~/.bashrc
exec $SHELL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment