赞
踩
清华: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/
python -m pip install --index-url https://pypi.douban.com/simple --upgrade pip
重启软件后,随便装一个模块,如下:(你可以看到下载模块速度很快!)
使用方法:shell pip install 下载的模块名 -i https://pypi.tuna.tsinghua.edu.cn/simple
比如我要下载numpy这个模块,执行以下命令:
pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple
这个方法的好处就是,你不用像其它配置一样要去配置一遍,你只需要在后面加上:
-i https://pypi.tuna.tsinghua.edu.cn/simple
方法1: 到cmd执行如下命令创建pip.ini: shell pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
然后我们把这个路径添加到系统环境变量就好了(怎么添加环境变量?跟前面给pip添加环境变量一样操作,只是路径不一样),貌似不添加到环境变量也可以使用。
方法二:如果刚刚这个命令你执行失败,你可以自己在c盘创建一个文件名叫做pip,pip文件夹下创建一个文件名pip.ini,内容为:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
还是一样添加到环境变量。
添加镜像源
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --set show_channel_urls yes
显示已有镜像源
conda config --show channels
anaconda 删除已有镜像源
conda config --remove channels 源名称或链接
conda config --remove-key channels # 删除所有源
https://blog.csdn.net/qq_42745706/article/details/123659643
https://blog.csdn.net/weixin_45779095/article/details/120143727
https://zhuanlan.zhihu.com/p/573955401
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。