•安裝python3.6可能使用的依賴python
yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-develsql
•到python官網找到下載路徑, 用wget下載sqlite
wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgzip
•解壓tgz包ssl
tar -zxvf Python-3.6.4.tgzget
•把python移到/usr/local下面openssl
mv Python-3.6.4 /usr/localit
•刪除舊版本的python依賴編譯
ll /usr/bin | grep pythonftp
rm -rf /usr/bin/python
•進入python目錄
cd /usr/local/Python-3.6.4/
•配置
./configure
•編譯 make
make
•編譯,安裝
make install
•刪除舊的軟連接,建立新的軟連接到最新的python
rm -rf /usr/bin/python
ln -s /usr/local/bin/python3.6 /usr/bin/python
python -V