pip镜像源更换
pip的默认镜像源在国内使用一般十分缓慢,需要我们更换为国内的镜像源,使用国内的镜像源有两种方式。
直达
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
查看镜像源
pip3 config list
可以看到我已经配置好了
使用
方式一:直接使用法
每次在安装python包的命名后面带上:
-i https://pypi.tuna.tsinghua.edu.cn/simple
pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple
方式二:一劳永逸法
换成清华大学的镜像源:
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
其他镜像源
中国科学技术大学:
https://pypi.mirrors.ustc.edu.cn/simple
豆瓣:
http://pypi.douban.com/simple/
阿里云:
http://mirrors.aliyun.com/pypi/simple/