编译安装 Python 3.6.1
安装python需要的依赖
apt-get install build-essential zlib1g-dev libsqlite3-dev sqlite3 bzip2 libbz2-dev
下载Python源码、解压
wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz
tar zxvf Python-3.6.1.tgz
cd Python-3.6.1
配置、编译、安装
mkdir /usr/local/python3
./configure --prefix=/usr/local/python3
make
make install
创建符号链接
rm /usr/bin/python3
rm /usr/bin/pip3
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3