-
-
Save liaoyw/f6eae05253331c396b593a0981372bea 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
This file contains hidden or 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
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