Skip to content

Instantly share code, notes, and snippets.

@jess-sol
Created August 21, 2019 16:17
Show Gist options
  • Save jess-sol/58a377cdee0d8513c014f15fee1cd720 to your computer and use it in GitHub Desktop.
Save jess-sol/58a377cdee0d8513c014f15fee1cd720 to your computer and use it in GitHub Desktop.
Install pyenv on CentOS 7 for a specific user with dependencies to manage installed versions of Python
sudo yum install \
git gcc zlib-devel bzip2-devel readline-devel \
sqlite-devel openssl-devel libffi-devel
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
cat <<'EOF' >> ~/.bash_profile
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi
EOF
pyenv install 3.7.4
pyenv global 3.7.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment