centos6.5安装python2.7

2019-08-06 14:18:14       xhs
python --version
yum install gcc gcc-c++ -y
yum install openssl-devel -y
yum install zlib zlib-devel -y
yum install wget -y
wget https://www.python.org/ftp/python/2.7.16/Python-2.7.16.tgz
ls -l Python-2.7.16.tgz 
tar -zxvf Python-2.7.16.tgz
cd Python-2.7.16
./configure
make 
make altinstall
python2.7 --version
whereis python2.7
wget https://files.pythonhosted.org/packages/c2/f7/c7b501b783e5a74cf1768bc174ee4fb0a8a6ee5af6afa92274ff964703e0/setuptools-40.8.0.zip
ls
unzip setuptools-40.8.0.zip
cd setuptools-40.8.0
python2.7 setup.py install
wget https://files.pythonhosted.org/packages/36/fa/51ca4d57392e2f69397cd6e5af23da2a8d37884a605f9e3f2d3bfdc48397/pip-19.0.3.tar.gz
tar -zxvf pip-19.0.3.tar.gz
cd pip-19.0.3
python2.7 setup.py install
pip2.7 --version
cd
mkdir .pip
scp 192.168.0.8:/root/.pip/pip.conf /root/.pip
pip2.7 install -r requirements.txt
wget http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm
yum install mysql-devel
pip2.7 install -r requirements.txt


发表评论