Centos7 Installation Python3 method because CENTOS7 originally installed Python2, and this Python2 can not be deleted, because there are many system commands, such as Yum to use. [[Email Protected]_105_217_centos Python ]-3.6.2]# Pythonpython2.7.5(Default,4 .,xx: the: -) [GCC4.8.5 20150623(Red Hat4.8.5- -)] on Linux2type" Help","Copyright","credits"Or"License" for Moreinformation. Enter the python command to see what you know is Python2.7. 5 version Inputwhichpython can view the location, typically in/usr/bin/the Python directory. Here's how to install Python3 first install a dependency packageYum-Y Groupinstall"Development Tools"Yum-YInstallZlib-develbzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-Devel and then according to their own needs to download different versions of Python3, I downloaded the Python3.6.2wgetHttps//Www.python.org/ftp/python/3.6.2/Python-3.6.2.tar.xzIf the speed is not fast enough, you can go directly to the official website to download, using WINSCP and other software to the server designated location, my storage directory is/usr/local/Python3, using the command:mkdir/usr/local/Python3 Create an empty folder and unzip the package, enter the directory, install Python3Tar-XVJF python-3.6.2.Tar. XZCD Python-3.6.2./configure--prefix=/usr/local/Python3 Make&& Make Installfinally create a soft linkLN-s/usr/local/python3/bin/python3/usr/bin/Python3LN-s/usr/local/python3/bin/pip3/usr/bin/PIP3 entering the Python3 test on the command line
CENTOS7 installation Python3