pypi是什么

簡介

pypi即Python Package Index首字母簡寫,表示Python的Packag索引,是Python的官方索引。

選擇依賴管理工具Pip

準(zhǔn)備工作

使用前請確保您已安裝python和pip,如果您尚未安裝python,可以點(diǎn)擊下面鏈接加速下載安裝:

Python加速地址:https://repo.huaweicloud.com/python/

臨時(shí)使用

運(yùn)行以下命令使用華為開發(fā)云軟件源安裝軟件包:

pip install --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple  
<some-package>

設(shè)為默認(rèn)

Pip的配置文件為用戶根目錄下的:~/.pip/pip.conf(Windows路徑為:C:Users<UserName>pippip.ini),您可以配置如下內(nèi)容:

[global]
index-url=https://repo.huaweicloud.com/repository/pypi/simple
trusted-host=repo.huaweicloud.com
timeout=120

 

選擇依賴管理工具Easy_install

準(zhǔn)備工作

使用前請確保您已安裝python和easy_install,如果您尚未安裝python,可以點(diǎn)擊下面鏈接加速下載安裝:

Python加速地址:https://repo.huaweicloud.com/python/

臨時(shí)使用

運(yùn)行以下命令使用華為開發(fā)云軟件源安裝軟件包:

easy_install -i https://repo.huaweicloud.com/repository/pypi/simple  <some-package>

設(shè)為默認(rèn)

easy_install的配置文件為用戶根目錄下的:~/.pydistutils.cfg(Windows路徑為:$HOMEpydistutils.cfg),您可以配置如下內(nèi)容:

[easy_install]
index-url=https://repo.huaweicloud.com/repository/pypi/simple

相關(guān)網(wǎng)址

Python官方地址:https://www.python.org/

Pypi文檔地址:https://pypi.org