Python
pyenv

Amazon Linux と Ubuntu に pyenv を入れて Python 3.6.0 の環境を作る方法

More than 1 year has passed since last update.

# Amazon Linux

yum install gcc gcc-c++ make git openssl-devel bzip2-devel zlib-devel readline-devel sqlite-devel

# Ubuntu
# apt-get install git gcc make openssl libssl-dev libbz2-dev libreadline-dev libsqlite3-dev

git clone https://github.com/yyuu/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="${HOME}/.pyenv"' >> ~/.bashrc
echo 'if [ -d "${PYENV_ROOT}" ]; then' >> ~/.bashrc
echo 'export PATH=${PYENV_ROOT}/bin:$PATH' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
echo 'fi' >> ~/.bashrc
source ~/.bashrc
pyenv install --list|grep 3.6
pyenv install 3.6.0
pyenv global 3.6.0
python --version
pip --version