Skip to content

Instantly share code, notes, and snippets.

@pcn
Forked from ysaotome/install_pyenv.sh
Last active April 26, 2019 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pcn/5b8934f6c08dd6fa6d3c3f5b08a90975 to your computer and use it in GitHub Desktop.
Save pcn/5b8934f6c08dd6fa6d3c3f5b08a90975 to your computer and use it in GitHub Desktop.
pyenv install for CentOS 6.5 x86_64
#!/bin/bash
# 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 -)"
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
cat << _PYENVCONF_ >> ~/.bash_profile
export PATH="$HOME/.pyenv/bin:$PATH"
eval "\$(pyenv init -)"
eval "\$(pyenv virtualenv-init -)"
_PYENVCONF_
pyenv install 2.7.16
pyenv versions
pyenv shell 2.7.16
pyenv global 2.7.16
pyenv versions
pyenv rehash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment