修改conda的镜像源
显示原来的镜像源
cmd中输入
conda config --show
再出现的一连串代码中可以找到镜像路径(我已经配置了清华的镜像源)
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- defaults
添加镜像源
添加清华源:
命令行中直接使用以下命令
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 --set show_channel_urls yes
运行conda clean -i
清除索引缓存,保证用的是镜像站提供的索引。
运行conda create -n myenv numpy
测试一下吧。
删除单个链接的命令:
conda config --remove channels your_url #你想移除的指定镜像路径
恢复默认镜像源
conda config --remove-key channels