CodeSky 代码之空

随手记录自己的学习过程

CentOS 安装Python-pip

2015-03-14 12:26分类: Linux/OS X评论: 0

首先检查是否安装make:

1rpm -qa|grep make
2automake-1.11.1-4.el6.noarch
3make-3.81-20.el6.x86_64
4
1yum -y install gcc automake autoconf libtool make
2

然后一步步来吧:

1yum groupinstall "Development tools"
2yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel
3
1wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz
2tar xf Python-2.7.6.tar.xz
3cd Python-2.7.6
4./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
5make && make altinstall
6

最后安装pip

1wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
2python2.7 ez_setup.py
3easy_install-2.7 pip
4

搞定=w= 参考: 在centos6中安装python2.7和pip Centos 6.4 安装Python 2.7 python-pip

评论 (0)