Tip: We must not destroy the environment of the system. Because several key applications depend on the Python 2.7.5(TheCentOS 7 default version). If you replace the system's Python environment, there will be a lot of unpredictable errors and even a system reload.
Pre-Installation Preparation
Yum-y Install epel-* Yum Clean All Yum Makecache Yum-y install gcc openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel |
Download Python Package
wget https://www.python.org/ftp/python/3.5.3/Python-3.5.3.tgz |
Unzip and install
Tar zxf python-3.5.3.tgz ./configure Make && make Altinstall |
Execute file for python program:/usr/local/bin/python3.5
python application directory: /usr/local/lib/python3.5
Pip the execution file: /usr/local/bin/pip3.5
To view the installed version
Python3.5-v
Centos 7.2 Installation Python 3.5 (for Python 3 all versions installed)