easy_install介绍
正常情况下,我们要给Python安装第三方的扩展包,我们必须下载压缩包,解压缩到一个目录,然后命令行或者终端打开这个目录,然后执行python setup.py install来进行安装。
这样是不是很繁琐呢?如果我们直接命令行执行easy_install Twisted
就把最新版的Twisted包装上去了,是不是很爽呢?
所以easy_install就是为了我们安装第三方扩展包更容易。
按装easy_install
首先下载easy_install的安装包,下载地址:
[]#wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz#md5=7df2a529a074f613b509fb44feefe74e –no-check-certificate
[]#tar -zxvf setuptools-0.6c11.tar.gz
[]#cd setuptools-0.6c11
[]#python setup.py install
[]#cd ../python2.7/site-packages/
[]#sh setuptools-0.6c11-py2.7.egg
Processing setuptools-0.6c11-py2.7.egg
setuptools 0.6c11 is already the active version in easy-install.pth
Installing easy_install script to /usr/local/python2.7/bin
Installing easy_install-2.7 script to /usr/local/python2.7/bin
Installed /usr/local/python2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg
Processing dependencies for setuptools==0.6c11
Finished processing dependencies for setuptools==0.6c11
[]#ln -s /usr/local/python2.7/bin/easy_install /usr/local/bin/easy_install
[]#easy_install -h