1.下載python3.6:wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgzpython
2.解壓:tar -xzf Python-3.6.4.tgzpython2.7
3.安裝:cd Python-3.6.4url
./configure --prefix=/usr/local/python3.6ip
makeget
make installpip
4.備份:mv /usr/bin/python /usr/bin/python2.7.5ftp
5.修改軟鏈接:下載
ln -fs /usr/local/python3.6/bin/python3.6 /usr/bin/python
ln -fs /usr/local/python3.6/bin/pip3.6 /usr/bin/pipyum
6.驗證:python -V文件
pip -V
7.修改yum文件:
vi /usr/bin/yum
vi /usr/libexec/urlgrabber-ext-down
第一行改成:#!/usr/bin/python2.7
8.升級:
python -m pip install --upgrade pip