2. Install Python's dependency package
Yum-y Groupinstall "Development tools" Yum-y install Openssl-devel sqlite-devel bzip2-devel ncurses-devel Gdbm-devel Read Line-devel tcl-devel tk-devel xz-devel zlib-devel db4-devel libpcap-devel
2. Download the Python3.5 source package and compile it
Cd/usr/local/srcwget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgztar-zxf/usr/local/src/ Python-3.5.1.tgz && cd python-3.5.1./configure--prefix=/opt/python3.5--enable-sharedmake && make Installln-s/opt/python3.5/bin/python3/usr/bin/python3echo "/opt/python3.5/lib" >/etc/ld.so.conf.d/ Python3.5.confldconfig
Detects if the python3.5 is successfully installed
Python3--version
3. Upgrade Pip
Because python3.5 comes with pip,setuptools.
/OPT/PYTHON3.5/BIN/PIP3 Install--upgrade pip
Ln-s/opt/python3.5/bin/pip/usr/bin/pip
3. Upgrade Setuptools
wget Https://bootstrap.pypa.io/ez_setup.py-O-| Python3
Ln-s/opt/python3.5/bin/easy_install/usr/bin/easy_install
CentOS7 installation Python3.5