安装python:
wget https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tgz tar xf Python-3.6.3.tgz cd Python-3.6.3 #安装编译依赖包 sudo apt-get install openssl sudo apt-get install zlib1g-dev #检查环境,编译安装 ./configure make && make install
rm -f /usr/bin/python ln -s /usr/local/bin/python3.6 /usr/bin/python python --version
安装pip:
wget https://pypi.python.org/packages/41/80/268fda78a53c2629128f8174d2952c7f902c93ebaa2062b64f27aa101b07/setuptools-38.2.3.zip#md5=0ae64455d276ff864b40aca9c06ea7c1 unzip setuptools-38.2.3.zip cd setuptools-38.2.3 python setup.py install wget https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz#md5=35f01da33009719497f01a4ba69d63c9 tar xf pip-9.0.1.tar.gz cd pip-9.0.1 python setup.py install