首页 > 代码库 > centos7安装python-3.5

centos7安装python-3.5

sudo yum install gcc
wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
sudo cp Python-3.5.0.tgz /usr/local/src/
cd /usr/local/src/
sudo tar -xzvf Python-3.5.0.tgz 
cd Python-3.5.0
sudo ./configure --prefix=/usr/local/python3
sudo make all
sudo make install
sudo ln -s /usr/local/python3/bin/python3 /usr/bin/python3
sudo ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3

 

备注:如果pip没有安装成功,提示Ignoring ensurepip failure: pip 7.1.2 requires SSL/TLS,执行以下命令

sudo yum install openssl-devel

centos7安装python-3.5