Last active
December 25, 2021 08:47
-
-
Save aruruka/5fd9b35ae898af7c34e2a89d68e57772 to your computer and use it in GitHub Desktop.
install pyenv on CentOS
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
git clone https://github.com/pyenv/pyenv.git ~/.pyenv | |
cd ~/.pyenv && src/configure && make -C src | |
echo -e 'if shopt -q login_shell; then' \ | |
'\n export PYENV_ROOT="$HOME/.pyenv"' \ | |
'\n export PATH="$PYENV_ROOT/bin:$PATH"' \ | |
'\n eval "$(pyenv init --path)"' \ | |
'\nfi' >> ~/.bashrc | |
echo -e 'if [ -z "$BASH_VERSION" ]; then'\ | |
'\n export PYENV_ROOT="$HOME/.pyenv"'\ | |
'\n export PATH="$PYENV_ROOT/bin:$PATH"'\ | |
'\n eval "$(pyenv init --path)"'\ | |
'\nfi' >> ~/.profile | |
echo -e 'source ~/.profile' >> ~/.bash_profile | |
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile | |
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bash_profile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment