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