新聞中心
python的包管理工具常見的有easy_install, setuptools, 還有pip, distribute,那麼這幾個工具有什么關系呢,看一下下面這個圖就明白了:

創(chuàng)新互聯(lián)主要從事成都網(wǎng)站設計、成都做網(wǎng)站、網(wǎng)頁設計、企業(yè)做網(wǎng)站、公司建網(wǎng)站等業(yè)務。立足成都服務銅川,十載網(wǎng)站建設經(jīng)驗,價格優(yōu)惠、服務專業(yè),歡迎來電咨詢建站服務:13518219792
相關推薦:《Python教程》
可以看到distribute是setuptools的替代方案,pip是easy_install的替代方案。
Distribute提供一個安裝python模塊的框架。你系統(tǒng)的每一個python解釋器都需要它自己的Distribute。你可以自己找到最新版本的Distribute,在這里https://pypi.python.org/pypi/distribute。
Distribute是對標準庫disutils模塊的增強,我們知道disutils主要是用來更加容易的打包和分發(fā)包,特別是對其他的包有依賴的包。
Distribute被創(chuàng)建是因為Setuptools包不再維護了。
可以通過distribute_setup.py 腳本來安裝Distribute,也可以通過easy_install, pip,源文件來安裝,不過使用distribute_setup.py來安裝是最簡單和受歡迎的方式。
# wget https://pypi.python.org/packages/source/d/distribute/distribute-0.7.3.zip --no-check-certificate # unzip distribute-0.7.3.zip # cd distribute-0.7.3 # python2.7 setup.py install
或者:
# wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.35.tar.gz # tar xf distribute-0.6.35.tar.gz # cd distribute-0.6.35 # python2.7 setup.py install
這將產(chǎn)生一個腳本/usr/local/bin/easy_install-2.7 ,你可以使用它來安裝python 2.7 模塊。它將安裝的模塊放到 /usr/local/lib/python2.7/site-packages/目錄中。
文章標題:創(chuàng)新互聯(lián)Python教程:pythondistribute是什么
分享地址:http://m.5511xx.com/article/cocpgpg.html


咨詢
建站咨詢
