python最常用的包管理工具是什么_Python包管理工具介绍

常见的包管理工具及关系

setuptools -->distribute

easy_install-->pip

1、distribute

distribute是对标准库disutils模块的增强,我们知道disutils主要是用来更加容易的打包和分发包,特别是对其他的包有依赖的包。distribute被创建是因为setuptools包不再维护了。

主页:https://pypi.python.org/pypi/distribute

安装及使用

ContractedBlock.gif

ExpandedBlockStart.gif

wget https://pypi.python.org/packages/5f/ad/1fde06877a8d7d5c9b60eff7de2d452f639916ae1d48f0b8f97bf97e570a/distribute-0.7.3.zip#md5=c6c59594a7b180af57af8a0cc0cf5b4a

unzip distribute-0.7.3.zip

cd distribute-0.7.3python setup.py install

View Code

2、pip

pip是安装python包的工具,提供了安装包,列出已经安装的包,升级包以及卸载包的功能。pip 是对easy_install的取代,提供了和easy_install相同的查找包的功能,因此可以使用easy_install安装的包也同样可以使用pip进行安装。

注:pip的安装需要setuptools或者distribute,如果你使用的是Python 3.x那么就只能使用distribute因为Python3.x不支持setuptools。

主页:https://pypi.python.org/pypi/pip

安装及使用

ContractedBlock.gif

ExpandedBlockStart.gif

setuptools安装

wget https://pypi.python.org/packages/source/s/setuptools/setuptools-20.9.0.tar.gz#md5=e5f4d80fcb68bcac179b327bf1791dec

tar -zxf setuptools-20.9.0.tar.gz

cd setuptools-20.9.0

python setup.py install

cd ..

wget https://pypi.python.org/packages/source/p/pip/pip-7.1.2.tar.gz#md5=3823d2343d9f3aaab21cf9c917710196

tar -zxf pip-7.1.2.tar.gz

cd pip-7.1.2python setup.py build&& python setup.py install

View Code