python2.7 升級到 python3.6


1.命令

 yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-develxz-devel gcc
 mkdir /usr/download
cd  /usr/download
wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz
 tar -xvf Python-3.6.4.tgz
 mkdir /usr/local/python3
cd Python-3.6.4

 ./configure --prefix=/usr/local/python3
make
make  install
 ln -s /usr/local/python3/bin/python3 /usr/bin/python
mv /usr/bin/python /usr/bin/python_bak
 ln -s /usr/local/python3/bin/python3 /usr/local/bin/python
[root@do1cloud03 ~]# python

2.參考:

https://www.jianshu.com/p/1cc8f77679c8


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM