-
-
Save y2k-shubham/ddd6d856ec997e9bb55be272af82393b to your computer and use it in GitHub Desktop.
pyenv install for CentOS 6.5 x86_64
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/zsh | |
# pyenv install for CentOS 6.5 x86_64 | |
yum install -y gcc gcc-c++ make git patch openssl-devel zlib-devel readline-devel sqlite-devel bzip2-devel | |
git clone git://github.com/yyuu/pyenv.git ~/.pyenv | |
export PATH="$HOME/.pyenv/bin:$PATH" | |
eval "$(pyenv init -)" | |
cat << _PYENVCONF_ >> ~/.zshrc | |
export PATH="$HOME/.pyenv/bin:$PATH" | |
eval "$(pyenv init -)" | |
_PYENVCONF_ | |
pyenv install 2.7.6 | |
pyenv versions | |
pyenv shell 2.7.6 | |
pyenv global 2.7.6 | |
pyenv versions | |
pyenv rehash | |
at least these two lines are very important (do add in ~/.bashrc
or ~/.zshrc
)
otherwise even though your'e able to set python versions, using pyenv local 3.x.x
, it has no impact
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
also do yum install -y libffi-devel
https://stackoverflow.com/a/48045929/3679900
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If pyenv goes out-of-path, add this line in ~/.zshrc / ~/.bashrc / ~/.bash_profile
export PATH="$HOME/.pyenv/bin:$PATH"