sudo apt-get install -y git make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev
curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
sudo vim ~/.bashrc
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
source ~/.bashrc
pyenv install -l
pyenv install 3.8.7
pyenv versions
pyenv global 3.8.7
pyenv versions
python -V
Last active
July 9, 2021 02:33
-
-
Save rg3915/9f2f2220e51194237900b2fc6ffc777e to your computer and use it in GitHub Desktop.
pyenv install 2021
type on .bash_profile
export PYENV_ROOT=~/.pyenv
export PATH="${PYENV_ROOT}/shims:${PATH}"
export PATH
python3.6.0 -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U
python -m pip install pip setuptools wheel virtualenv virtualenvwrapper -U
pyenv versions
pyenv install 3.8.6
pyenv versions
pyenv global 3.8.6
pyenv versions
python -V
pyenv global 3.9.6 3.8.9 system
Update because last version of pyenv and Python 3.9.6
if ! grep -Eq "^[#]{4}[[:space:]]pyenv[[:space:]]config$" "${HOME}/.bashrc" ; then echo -e "\n\nsetup pyenv configuration:\nThe following content was inserted at the end of the ${HOME}/.bashrc file\n"; echo -e '\n#### pyenv config\nif [ -f "$HOME/.pyenv/bin/pyenv" ] && ! type -P pyenv &>/dev/null ; then\n export PYTHON_CONFIGURE_OPTS="--enable-shared"\n export CFLAGS="-O2"\n export PYTHON_BUILD_ARIA2_OPTS="-x 10 -k 1M"\n export PYENV_ROOT="${HOME}/.pyenv"\n export PATH="${PYENV_ROOT}/bin:${PATH}"\n eval "$(pyenv init --path)"\n eval "$(pyenv init -)"\n eval "$(pyenv virtualenv-init -)"\n if [[ ! "$(pyenv which python)" == "/usr/bin/python" ]] ; then \n pyenv virtualenvwrapper_lazy;\n fi\nfi\n#### pyenv config end' | tee --append "${HOME}/.bashrc"; source "${HOME}/.bashrc"; else echo -e "\n\npyenv configuration already installed in ${HOME}/.bashrc"; fi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://gist.github.com/luzfcb/1a7f64adf5d12c2d357d0b4319fe9dcd