標籤:版本 com bin packages 解壓 ber 依次 檔案 val
1,在 /usr/local/src/下
擷取python3.5的包
wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tar.xz
2. .tar.xz的解壓方法:
xz -d mpfr-3.1.2.tar.xz
會產生一個mpfr-3.1.2.tar 檔案,再執行
tar -xvf mpfr-3.1.2.tar
xz -d Python-3.5.1.tar.xz
tar -xf Python-3.5.1.tar
3,在/usr/local/下建立python3.5錄目
mkdir /usr/local/python3.5
4.
首先cd /usr/local/src/Python-3.5.1
依次執行以下命令
./configure --prefix=/usr/local/python3.5make allmake installmake cleanmake distclean 5.備份python2mv /usr/bin/python /usr/bin/python2.6.6 修改軟串連 sudo ln -s /usr/local/python3.5/bin/python3 /usr/bin/python 6 .cd homepython查看是否指向python3.5------------------------------------------------------------------------------------------------------------------------------------如果在python2下安裝了django,1,cd /usr/lib64/python2.7/site-packages 2,rm -rf django rm -rf Django-1.11.1.dist-info #將python2下的django刪除 (其他人或有出入) 3.pip install djangook!
centos python2升級為python3 升級舊版本django