标签:python setuptools pip
安装python 2.7版本
wget https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz
tar zxvf Python-2.7.8.tgz
cd Python-2.7.8
./configure --prefix=/usr/local/python2.7 --with-readlinemake (解决方向键问题) --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
‘https://pypi.python.org/packages/source/i/ipython/ipython-3.1.0.tar.gz#md5=a749d90c16068687b0ec45a27e72ef8f‘
--no-check-certificate
tar zxvf ipython-3.1.0.tar.gz
cd ipython-3.1.0
python setup.py install
ipthon安装完成
安装setuptools
wget https://pypi.python.org/packages/source/s/setuptools/setuptools-18.2.tar.gz#md5=52b4e48939ef311d7204f8fe940764f4 --no-check-certificate
cd setuptools-18.2
python setup.py install
安装pip
wget http://pypi.python.org/packages/source/p/pip/pip-1.0.tar.gz
python setup.py build
python setup.py install
ln -s /usr/local/python2.7/bin/pip /usr/bin/pip
pip安装完成
用pip 安装测试:pip install flake8
搞定!
本文出自 “闷骚的伤” 博客,请务必保留此出处http://echoliuye.blog.51cto.com/10053145/1688124
centos源码方式安装ipython2.7,setuptools、pip并解决ipython不能不能使用方向键的问题
标签:python setuptools pip
原文地址:http://echoliuye.blog.51cto.com/10053145/1688124