#以下方法是在centos6.5 test, the specific needs of the user testing.
1. Download python3.6.5
wget https://www.Python.org/ftp/python/3.6.5/Python-3.6.5.tgz
2. Unzip Python
TAR-ZVXF python-3.6.5.tgz
MV Python-3.6.5 ~/softwares/python-3.6.3
#softwares文件夹没有可以建立
3. Enter the Python folder to create the installation directory
CD ~/softwares/python-3.6.5
mkdir/usr/local/python3.6.5
4. Configure the Python installation location
./configure--prefix=/usr/local/python3.6.5
5. Compiling python
Make
6. Install Python
Make install
"Zipimport" appears during compilation. Zipimporterror:can ' t decompress data; Zlib Not Available "error message is caused by a missing package, the workaround is to install the required package:
Yum Install zlib zlib-devel-y
7. Back up the original Python command execution file
Mv/usr/bin/python/usr/bin/pythonbak
8. Create a new Python soft connection
Ln-s/usr/local/python3.6.5/bin/python3.6/usr/bin/python
9. View the Python version
Python
Python upgrade method