更换Anaconda的下载源为国内源的办法
1、目前国内可用的anaconda下载源
清华镜像anaconda源:
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
ssl_verify: true
上海交大anaconda镜像源:
channels:
- https://mirrors.sjtug.sjtu.edu.cn/anaconda/pkgs/main/
- https://mirrors.sjtug.sjtu.edu.cn/anaconda/pkgs/free/
- https://mirrors.sjtug.sjtu.edu.cn/anaconda/cloud/conda-forge/
ssl_verify: true
中科大anaconda镜像源
channels:
- https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
- https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
- https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
ssl_verify: true
2、替换anaconda的下载源为国内镜像源的方法
方法一:手动修改anaconda下载源的配置文件" /home/你的用户名/.condarc"为以上几个下载源之一即可。
在安装Anaconda时选定的用户目录下(C盘中的‘user’ or‘用户’ 文件夹下寻找),找到.condarc文件,重命名为.condarc0(就是备份一下),然后新建一个txt文件,文件名包括后缀更改为.condarc,用记事本打开,输入上面源。打开Anaconda Prompt
输入conda update --all,回车,等待更新完(期间需要输入一次y)
方法二:使用anaconda添加下载源的命令来进行相应的下载源的添加。
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro/
3、删除国内下载源的方法
conda config --remove-key channels
本文作者:TwcatL_tree
本文链接:https://www.cnblogs.com/twcat/p/16912381.html
版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步