Installation of python3.5 may use dependencies
Yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel-y
Find the download path on the Python website and download it with wget
wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz
Unzip the tgz bag
TAR-ZXVF python-3.5.1.tgz
Move Python below the/usr/local.
MV Python-3.5.1/usr/local
Remove old versions of Python dependencies
Ll/usr/bin | grep python
Rm-rf/usr/bin/python
Go to Python directory
Cd/usr/local/python-3.5.1/
Configuration
./configure
Compiling make
Make
Compile, install
Make install
Delete old soft links, create new soft link to latest Python
Rm-rf/usr/bin/python
Ln-s/usr/local/bin/python3.5/usr/bin/python
Python-v
[[email protected] ~]# python
Python 3.6.3 (Default, Nov 12 2017, 04:07:16)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on Linux
Type "Help", "copyright", "credits" or "license" for more information.
>>>
This article is from the "Linux" blog, so be sure to keep this source http://chenjisong.blog.51cto.com/7858025/1983088
Python essay (i), installation of the Python environment under Linux system