Mac os下设置国内镜像加速站

  无法忍受国外pip 仓库的龟速地址,安利一波国内高速镜像地址... 首推阿里云 repository

  马爸爸  I ❤ u

 如果是windows环境

请在 c:\users\administrator下创建名为pip的文件夹

随后在pip文件夹内创建pip.ini,配置内容同config里的配置~

 

1 $ vim ~/.pip/pip.conf

在config中做如下配置:

1 [global]
2 index-url = http://mirrors.aliyun.com/pypi/simple/
3 [install]
4 trusted-host = mirrors.aliyun.com

trusted-host一定要设置,不然会报错:

1 The repository located at mirrors.aliyuncs.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with ‘–trusted-host mirrors.aliyuncs.com’.

升级OK!

(二)pycharm 中设置阿里云Repository 地址

File --->Settings -->

管理仓库

编辑 或者 添加 随意

修改为  https://mirrors.aliyun.com/pypi/simple/
结束,纵享丝滑.....
原文地址:https://www.cnblogs.com/shine-rainbow/p/10200035.html