系统环境:

Centos6.7

2.6.32-573.el6.x86_64


一、必要安装

yum install sqlite-devel sqlite  #ipython依赖

yum install zlib-devel zlib -y       #setuptools依赖

yum install openssl openssl-devel -y    #pip依赖


二、安装python

cd Python-2.7.11

./configure

make && make install

mv /usr/bin/python /usr/bin/python.ori

ln -s /usr/local/bin/python /usr/bin/python

sed -i 's/#!\/usr\/bin\/python/#!\/usr\/bin\/python2.6/g' /usr/bin/yum


三、安装pip

cd setuptools-21.0.0

python setup.py install

cd ../pip-8.1.2

python setup.py install


四、安装ipython

yum install ncurses-devel  #readline依赖

pip install readline    #ipython依赖

pip install ipython