Last active
April 17, 2020 06:38
-
-
Save nnsnodnb/6e47e8ea55ac4c427ef94068760d04d1 to your computer and use it in GitHub Desktop.
This file contains 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 -eu | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
sudo apt-get install -y git build-essential libffi-dev libssl-dev zlib1g-dev liblzma-dev libbz2-dev libreadline-dev libsqlite3-dev | |
git clone https://github.com/yyuu/pyenv.git ~/.pyenv | |
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc | |
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(pyenv init -)"' >> ~/.bashrc | |
source ~/.bashrc | |
read -p "Enter Python version: " PYTHON_VERSION | |
pyenv install $PYTHON_VERSION | |
pyenv rehash | |
pyenv global $PYTHON_VERSION | |
pip install -U pip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment