1. Yum-y Install openssl*
(PIP relies on SSL environment)
2. Compile and install Python3
: https://www.python.org/ftp/python/
1 tar zxvf python-3.5. 2 . tgz 2 CD python-3.5. 2 3 ./Configure4make makeinstall
Installation Steps
3. After the installation is complete, the default is PIP3. 4. The installation can be completed with a module to try
1[Email protected] python-3.5.2]# PIP3InstallPymysql2 collecting Pymysql3Downloading pymysql-0.7.9-py3-none-ANY.WHL (78kB)4 -% |████████████████████████████████| 81kB6.3kb/s5 Installing collected Packages:pymysql6Successfully installed pymysql-0.7.97You is using PIP version8.1.1, however version9.0.1is available.8You should consider upgrading via the'pip install--upgrade pip'Command.
The above prompts for a new version that can be upgraded.
You can upgrade the PIP3 with the command it prompts.
But pay attention to replacing the PIP command with PIP3.
1[Email protected] python-3.5.2]# PIP3Install--upgrade Pip2 collecting Pip3Downloading pip-9.0.1-PY2.PY3-NONE-ANY.WHL (1. 3MB)4 -% |████████████████████████████████|1.3MB3.2kb/s5 Installing collected Packages:pip6Found existing Installation:pip8.1.17Uninstalling pip-8.1.1:8Successfully uninstalled pip-8.1.19Successfully installed pip-9.0.1Ten[Email protected] python-3.5.2]# PIP3--version OnePip9.0.1From/usr/local/lib/python3.5/site-packages (python3.5)
Upgrade complete
Python3 and PIP3 installation and use