分类: Python/Ruby
2015-08-25 17:25:48
安装python 2.7版本
wget
tar zxvf Python-2.7.8.tgz
cd Python-2.7.8
./configure --prefix=/usr/local/python2.7 --with-readline-devel(解决方向键问题) --with-openssl
--with-openssl-devel (安装pip需要) --with-zlib(安装setuptools)需要
make
make install
mv /usr/bin/python /usr/bin/old_python
ln -s /usr/local/python2.7/bin/python2.7 /usr/bin/python
yum是python做的,所以
这样操作之后,yum就不能正常了,需要修改yum文件
vim /usr/bin/yum
第一行把 #!/usr/bin/python 改为 #!/usr/bin/old_python
下面继续安装ipython
wget
''
--no-check-certificate
tar zxvf ipython-3.1.0.tar.gz
cd ipython-3.1.0
python setup.py install
ipthon安装完成
安装setuptools
wget
--no-check-certificate
cd setuptools-18.2
python setup.py install
安装pip
wget
python setup.py build
python setup.py install
ln -s /usr/local/python2.7/bin/pip /usr/bin/pip
pip安装完成
用pip 安装测试:pip install flake8
搞定!