更换pip源到国内镜像

参考:

https://blog.csdn.net/chenghuikai/article/details/55258957

https://developer.aliyun.com/mirror/pypi?spm=a2c6h.13651102.0.0.3e221b11EnKPOu

 

PyPI 镜像

简介

PyPI (Python Package Index) 是 Python 编程语言的软件存储库。开发者可以通过 PyPI 查找和安装由 Python 社区开发和共享的软件,也可以将自己开发的库上传至 PyPI 。

配置方法

a. 找到下列文件

~/.pip/pip.conf

b. 在上述文件中添加或修改:

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

[install]
trusted-host=mirrors.aliyun.com

相关链接

posted @ 2021-01-02 15:18  dolinux  阅读(77)  评论(0)    收藏  举报