1, under the/usr/local/src/
Get the python3.5 Package
wget HTTPS://WWW.PYTHON.ORG/FTP/PYTHON/3.5.1/PYTHON-3.5.1.TAR.XZ
2. Tar.xz Decompression Method:
Xz-d MPFR-3.1.2.TAR.XZ
Generates a Mpfr-3.1.2.tar file and then executes
TAR-XVF Mpfr-3.1.2.tar
xz
-
d Python
-
3.5
.
1.tar
.xz
tar
-
xf Python
-
3.5
.
1.tar
3, create a python3.5 record under/usr/local/
mkdir
/
usr
/
local
/
python3.
5
4.
首先cd
/
usr
/
local
/
src
/
Python
-
3.5
.
1
Execute the following command in turn
./configure --prefix=/usr/local/python3.5
make all
make install
make clean
make distclean
5. Backup Python2
mv
/
usr
/
bin
/
python
/
usr
/
bin
/
python2.
6.6
修改软连接
sudo ln
-
s
/
usr
/
local
/
python3.
5
/
bin
/
python3
/
usr
/
bin
/
python
6. cd Homepython See if you are pointing to python3.5------------------------------------------------------------------------------------------------ ------------------------------------if Django,1,cd/usr/lib64/python2.7/site-packages 2,rm-rf Django RM is installed under Python2 -RF Django-1.11.1.dist-info #将python2下的django删除 (other people or not) 3.pip install djangook!
CentOS Python2 upgrade to Python3 upgrade old version Django