yum install gcc zlib zlib-devel libffi-devel readline readline-devel openssl openssl-devel
pip3 is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
这里以python3.5为例,也能够选择其余的版本。python
tar -xvf Python-3.5.0.tgz # 解压到当前目录
cd Python-3.5.0
./configure --prefix=/usr/local/python3.5
make && make install
/usr/local/python3.5/bin/python3 # 回车进入python3.5命令行
ln -s /usr/local/python3.5/bin/python3 /usr/bin/python3
而后在任意目录使用python3命令就能够进入python3.5的命令行。 ui