Python:Windows下更改Python源至清华镜像源

1)临时使用镜像源下载Python包:

以numpy为例:

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

其他镜像源地址:

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


2)永久更改镜像源

在  “C:\Users\用户名”  文件夹下,添加pip文件夹,文件夹内新建pip.ini文件,内容为:

[global]

index-url = https://pypi.tuna.tsinghua.edu.cn/simple

 

posted @ 2019-11-19 22:51  山水迢迢  阅读(11056)  评论(0编辑  收藏  举报