CentOS 7 python2.7.5 upgrade to 3.5.2
System CentOS 7
Package python3.5.2 Download: wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz
View Legacy Packages
[Email protected] ~]# python-v
Python 2.7.5
To create a Python-3.5.2 installation directory
[Email protected] ~]# mkdir/usr/local/python3.5.2
Unpacking Packages
[Email protected] ~]# CD/USR/SRC
[Email protected] src]# tar zxf python-3.5.2.tgz
Go to Catalog
[Email protected] src]# CD PYTHON-3.5.2/
Compile
[Email protected] python-3.5.2]#/configure--prefix=/usr/local/python3.5.2
Installation
[[email protected] python-3.5.2]# make && make install
Back up old versions
[Email protected] python-3.5.2]# mv/usr/bin/python/usr/bin/python_2.7.5
Create a soft link
[Email protected] python-3.5.2]# ln-s/usr/local/python3.5.2/bin/python3.5/usr/bin/python
View now version
[Email protected] ~]# python-v
Python 3.5.2
Upgrade complete
This article is from the "Duyuheng" blog, make sure to keep this source http://duyuheng.blog.51cto.com/12879147/1950620
CentOS 7 python2.7.5 upgrade to 3.5.2