setuptools
是 Python Enterprise Application Kit(PEAK)的一个副项目,可以让程序员更方便的创建和发布 Python 包。
软件管理器安装
sudo apt-get install python-setuptools
或者
1. 下载ez_setup.py。Linux下可使用此命令: wget -q http://peak.telecommunity.com/dist/ez_setup.py。
2. 运行ez_setup.py:Python ez_setup.py ;如果运行正常,那就安装成功了。
easy_install
当需要安装第三方python包时,可能会用到easy_install命令。easy_install是由PEAK(Python Enterprise Application Kit)开发的setuptools包里带的一个命令,所以使用easy_install实际上是在调用setuptools来完成安装模块的工作。
pip
软件管理器安装
sudo apt-get install python-pip
使用脚本安装和升级pip
要安装或升级pip,需要下载 get-pip.py. 地址:
wget -q https://bootstrap.pypa.io/get-pip.py
然后运行以下命令 (需要管理员权限):
sudo python get-pip.py
如果 setuptools (或 distribute) 未安装, get-pip.py 会 自动为你安装 setuptools
如果需要升级 setuptools (或 distribute), 运行 pip install -U setuptools