1. Install Python3 under Linux
A, prepare the compilation environment (if the environment is not correct, you may encounter various problems, such as wget can not download https linked files)
1 2 |
Yum Groupinstall "Development Tools" yum install zlib-devel bzip2-devel openssl-devel ncurses-devel |
2 Download Python3.5 Code pack
wget Https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tar.xz
In the installation package, there is a readme file, which has written how to install
Tar jxvf python-3.5.0.tar.xz
cd Python-3.5.0
./configure--prefix=/usr/local/python3 make
& & Make Install
Make a soft chain:
Ln-s/usr/local/python3/bin/python3.5/usr/local/bin/python3
The installation was successful.
If prompted: Ignoring Ensurepip Failure:pip 7.1.2 requires SSL/TLS
This is the reason for not installing or upgrading OENSSL:
Yum Install Openssl-devel
(OpenSSL installed under Ubuntu 14.04)
Repeat the compilation scheme again python3.5:
The final is as follows:
Prompts to successfully install pip-7.12 and setuptools at the same time.
Both PIP3 and PIP hint that there is no error.
Make a soft chain:
Ln-s/usr/local/python3/bin/pip3.5/usr/local/bin/pip
Ln-s/usr/local/python3/bin/easy_install/usr/local/bin/easy_install
Upgrade PIP to latest version:
Pip Install--upgrade pip
PIP installation succeeded.