python安装新版本及pip
Linux安装python:
yum install zlib -y
yum install zlib-devel -y
yum install readline-devel -y
yum install openssl -y
yum install openssl-devel -y
yum install sqlite-devel -y
wget https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tgz
tar -xvf Python-2.7.11.tgz
cd Python-2.7.11
./configure
make
make install
which python
mv /usr/bin/python /usr/bin/python2.6
ln -s /usr/local/bin/python2.7 /usr/bin/python
whereis python
whereis yum
vi /usr/bin/yum
第一行改成:#!/usr/bin/python2.6即可,由于yum不兼容python2.7所以改成2.6即可
安装setuptools
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
tar zxvf setuptools-0.6c11.tar.gz
cd setuptools-0.6c11
python setup.py build
python setup.py install
安装pip
yum install python-setuptools.noarch -y
wget https://pypi.python.org/packages/41/27/9a8d24e1b55bd8c85e4d022da2922cb206f183e2d18fee4e320c9547e751/pip-8.1.1.tar.gz --no-check-certificate
tar -zxvf pip-8.1.1.tar.gz
cd pip-8.1.1
python setup.py install