Skip to content

Instantly share code, notes, and snippets.

@januszm
Forked from ytspar/install-python-ubuntu.sh
Created February 23, 2021 13:46
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 januszm/f25d8437bc1f33b268730ce01d399ee1 to your computer and use it in GitHub Desktop.
Save januszm/f25d8437bc1f33b268730ce01d399ee1 to your computer and use it in GitHub Desktop.
Install Python with Pyenv on Ubuntu (16.04)
sudo apt-get update
sudo apt-get install build-essential git libreadline-dev zlib1g-dev libssl-dev libbz2-dev libsqlite3-dev
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
# may need this, but install script above should handle it; and yeah, you can do multiline inserts with awk/sed or whatever
echo 'export PATH="/root/.pyenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
source ~/.bashrc
pyenv install 3.6.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment