关于Python3.5.4我们要了解这样一句话:Python 3.5.4 is the last “bugfix” release of 3.5. The Python 3.5 branch has now entered “security fixes only” mode; going forward, the only improvements made in the 3.5 branch will be security fixes.
本人上传到CSDN的资源下载(http://download.csdn.net/download/lockey23/9932108
#以下为官网下载,一般速度都很慢,建议从我本人上传资源下载
[root@lockey Desktop]# wget https://www.python.org/ftp/python/3.5.4/Python-3.5.4.tgz
#无论你是通过什么方式下载的,3.5.4版的.tgz包的地址都是这个
[root@lockey Desktop]# tar -xzf Python-3.5.4.tgz
[root@lockey Desktop]# cd Python-3.5.4/
[root@lockey Python-3.5.4]# ./configure
[root@lockey Python-3.5.4]# make
[root@lockey Python-3.5.4]# make install
如果顺利那你很幸运嘛,但是如果有错误或者部分包安装失败,如:
Ignoring ensurepip failure: pip 9.0.1 requires SSL/TLS
那么我们就需要根据错误执行以下安装:
[root@lockey Desktop]# yum install openssl-devel
[root@lockey Desktop]# yum install libssl-dev
然后,继续make install,下图为成功截图
为什么我执意要安装成功pip呢,因为它是Python的包管理工具,有了它后面许多和Python相关的模块都能轻松安装管理!
[root@lockey Python-3.5.4]# pip3.5 install virtualenv
Collecting virtualenv
Downloading virtualenv-15.1.0-py2.py3-none-any.whl (1.8MB)
100% |████████████████████████████████| 1.8MB 32kB/s
Installing collected packages: virtualenv
Successfully installed virtualenv-15.1.0
[root@lockey develop]# virtualenv -p /usr/local/bin/python3 python354
Running virtualenv with interpreter /usr/local/bin/python3
Using base prefix '/usr/local'
New python executable in /develop/python354/bin/python3
Also creating executable in /develop/python354/bin/python
Installing setuptools, pip, wheel...done.
[root@lockey develop]# ls
python354
[root@lockey develop]# cd python354/
[root@lockey python354]# source ./bin/activate
(python354) [root@lockey python354]# python
Python 3.5.4 (default, Aug 13 2017, 20:30:06)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
ok, over!