成人午夜视频全免费观看高清-秋霞福利视频一区二区三区-国产精品久久久久电影小说-亚洲不卡区三一区三区一区

python配置pip的方法

這篇文章將為大家詳細(xì)講解有關(guān)python配置pip的方法,小編覺得挺實(shí)用的,因此分享給大家做個參考,希望大家閱讀完這篇文章后可以有所收獲。

成都創(chuàng)新互聯(lián)公司是專業(yè)的盤龍網(wǎng)站建設(shè)公司,盤龍接單;提供做網(wǎng)站、網(wǎng)站設(shè)計(jì),網(wǎng)頁設(shè)計(jì),網(wǎng)站設(shè)計(jì),建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進(jìn)行盤龍網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴(kuò)展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團(tuán)隊(duì),希望更多企業(yè)前來合作!

pip用于python包的安裝,類似于Redhat下的yum、Ubuntu下的apt-get,可以解決安裝包依賴的問題,非常方便。這里,我們主要講下windows下的配置。

配置文件路徑

有多個路徑可以配置pip,如果不存在該路徑,可以自行創(chuàng)建。

1. 每個用戶的配置路徑:%APPDATA%\pip\pip.ini或者%HOME%\pip\pip.ini。其中,%APPDATA%和%HOME%的值可以在命令行中通過echo命令來打印出具體的值,從而進(jìn)行配置?!?/p>

1. 通用路徑:win7下為C:\ProgramData\pip\pip.ini,win XP下為C:\Documents and Settings\All Users\Application Data\pip\pip.ini。其中,win7下為隱藏文件。

1. 另外,還可以通過環(huán)境變量PIP_CONFIG_FILE來指定配置文件的路徑。

配置文件內(nèi)容

只要pip命令中出現(xiàn)的選項(xiàng)都可以配置在配置文件中,比如直接輸入pip命令,會提示以下選項(xiàng),那么這些選項(xiàng)都可以卸載配置文件中。

General Options:
  --log <path>                Path to a verbose appending log.
  --proxy <proxy>             Specify a proxy in the form
                              [user:passwd@]proxy.server:port.
  --retries <retries>         Maximum number of retries each connection should
                              attempt (default 5 times).
  --timeout <sec>             Set the socket timeout (default 120.0 seconds).
  --exists-action <action>    Default action when a path already exists:
                              (s)witch, (i)gnore, (w)ipe, (b)ackup.
  --trusted-host <hostname>   Mark this host as trusted, even though it does
                              not have valid or any HTTPS.
  --cert <path>               Path to alternate CA bundle.
  --client-cert <path>        Path to SSL client certificate, a single file
                              containing the private key and the certificate
                              in PEM format.
  --cache-dir <dir>           Store the cache data in <dir>.
  --no-cache-dir              Disable the cache.
  --disable-pip-version-check
                              Don't periodically check PyPI to determine
                              whether a new version of pip is available for
                              download. Implied with --no-index.

這些選項(xiàng)是直接輸入pip命令得到,所以歸為General Options,在配置文件中,就要部署在global選項(xiàng)下,示例如下:

[global]
index-url = http://pypi.douban.com/simple
trusted-host = pypi.douban.com
disable-pip-version-check = true
timeout = 120

輸入命令pip help install,就會提示pip install支持的所有選項(xiàng),在配置文件中,就要部署在install選項(xiàng)下,示例如下:

[install]
ignore-installed = true
no-dependencies = yes

pip支持install、download、uninstall、freeze、list、show、search、wheel、hash、completion等多條子命令,這些都可以分別配置。

關(guān)于python配置pip的方法就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,可以學(xué)到更多知識。如果覺得文章不錯,可以把它分享出去讓更多的人看到。

文章名稱:python配置pip的方法
鏈接地址:http://jinyejixie.com/article10/jpoego.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站建設(shè)標(biāo)簽優(yōu)化、網(wǎng)站維護(hù)、云服務(wù)器、網(wǎng)站收錄、自適應(yīng)網(wǎng)站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都網(wǎng)頁設(shè)計(jì)公司
盖州市| 双江| 迁西县| 余干县| 望奎县| 隆安县| 崇阳县| 东兴市| 内黄县| 治县。| 高雄县| 车险| 长武县| 鸡东县| 鸡东县| 内丘县| 泰州市| 大同市| 南丹县| 利津县| 阿拉尔市| 安多县| 内黄县| 大城县| 开平市| 峨边| 赤壁市| 边坝县| 长春市| 梧州市| 定边县| 曲周县| 怀远县| 济源市| 蓬安县| 比如县| 洛隆县| 镇安县| 奎屯市| 临夏县| 会泽县|