参考:https://blog.csdn.net/wslejbb/article/details/137921123
1、下载python
https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz
2、安装python
mkdir /usr/local/python3
tar -xf Python-3.6.1.tgz
cd Python-3.6.1/
./configure --prefix=/usr/local/python3
make && make install
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
cat >> /etc/profile <<EOF
export PATH=$PATH:$HOME/bin:/usr/local/python3/bin
EOF
source /etc/profile
python3 -V
3、安装pip
wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-19.6.tar.gz#md5=c607dd118eae682c44ed146367a17e26 安装setuptools
python3 setup.py build
python3 setup.py install
wget https://pypi.python.org/packages/source/p/pip/pip-8.0.2.tar.gz#md5=3a73c4188f8dbad6a1e6f6d44d117eeb
python3 setup.py build
python3 setup.py install