前言
开始
这里给大家列几个镜像源
镜像名称 | 镜像url |
---|---|
清华 | 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 install <包名称> -i <镜像源url>
多次使用镜像源
*方法来自网络,不一定准确
Windows
在C:/user/<用户名>
或C:/用户/<用户名>
(请根据电脑情况选择)中创建pip.ini
并输入(如果已存在不需要重新创建)
[global]
index-url = <镜像源url>
mac及linux
创建~/.pip/pip.conf
(如果已存在不需要重新创建)并输入
[global]
index-url = <镜像源url>
作者
hit-road
拜拜,下课!
hit-road不定期跟新,不见不散!