pip 提速

1.临时提速

在 pip install 包名 后面加上 -i + 镜像地址,这样 pip 安装时即可成倍的提速了。

 

国内主要镜像地址如下:

清华:https://pypi.tuna.tsinghua.edu.cn/simple

阿里云:http://mirrors.aliyun.com/pypi/simple/

中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

华中理工大学:http://pypi.hustunique.com/

山东理工大学:http://pypi.sdutlinux.org/

豆瓣:http://pypi.douban.com/simple/

 

所以临时让 pip 安装时提速的格式如下:

 pip install 包名 -i https://pypi.tuna.tsinghua.edu.cn/simple

 

2.永久提速(Windows系统)

(1)、在 C:\Users\Administrator\pip 建一个文件 pip.ini如果Administrator 中 没有pip文件夹则自己新建一个,然后新建一个 pip.ini 文件

(2)、在 pip.ini 文件输入:

    [global]
    index-url = https://pypi.douban.com/simple

    [install]
    trusted-host = pypi.douban.com

 

posted @ 2021-01-09 17:16  少年_不识愁滋味  阅读(118)  评论(0编辑  收藏  举报