Last active
November 20, 2018 08:13
-
-
Save yijia2413/8e25c51198e40221874003e6b6523d7b to your computer and use it in GitHub Desktop.
install pyenv virtualenv
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/bash | |
set -ex | |
yum install -y git gcc gcc-c++ | |
yum install -y zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel xz xz-devel | |
yum install -y zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel \ | |
openssl-devel xz xz-devel libffi-devel | |
# curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash | |
git clone https://github.com/pyenv/pyenv.git ~/.pyenv | |
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc | |
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc | |
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc | |
exec "$SHELL" | |
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv | |
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc | |
exec "$SHELL" | |
pyenv install 3.7.1 | |
pyenv install 3.6.6 | |
pyenv install 2.7.15 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment