One. Python using wget to download the installation package
I was among the virtual installation:
wget http://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
Error:
solve:
Search a moment that is not installed openssl, then install it
yum install openssl-devel
No error
Find another hair
Download HTTPS wget: //www.openssl.org/source/openssl-1.0.2q.tar.gz
-Zxvf OpenSSL unpacking tar -1.0 .2q.tar.gz
OpenSSL enter cd -1.0 .2q
配置 ./config --prefix=/usr --shared
Installation make
make install
And then install the upgrade Python
Download wget --no-check-certificate http://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
Once downloaded to the download directory, extract
takes -xzvf Python 3.3.0.tgz
File into the unzipped folder
cd Python-3.3.0
Python3 first build a folder in / usr / local before compilation (as the installation path of python, do not overwrite the old version)
mkdir /usr/local/python3
Began to compile and install
./configure --prefix=/usr/local/python3
make
make install
At this point it does not cover the old version, and then the original / usr / bin / python link changed to another name
mv /usr/bin/python /usr/bin/python_old2
And then create a new version of python link
ln -s /usr/local/python3/bin/python3/usr/bin/python
This time input
python -V
Although this method can be successfully installed, but it brought new problems, such as yum can not use it properly
Modify / usr / bin / yum first behavior:
#!/usr/bin/python_old2
On it