Anaconda 配置国内镜像源

博客讲述了在安装2021版Anaconda后无法打开Navigator的问题,通过以管理员身份运行conda命令更新导致的错误。解决方案包括修改conda配置文件,添加国内镜像源如阿里云或清华源,以及执行conda update anaconda-navigator。在过程中遇到的文件路径问题和conda链接错误,最终通过卸载重装和清理缓存解决。此外,还介绍了如何配置pip的阿里云镜像源。

遇到问题:安装2021版本后无法打开Anaconda Navigator

解决方案:使用管理员身份打开Avaconda Prompt,输入conda update anaconda-navigator

遇到问题:报错:

#安装在d盘
Fetching package metadata ...
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/win-64/repodata.json>
Elapsed: -

分析是国内镜像源问题

解决方案:添加镜像文件

Linux用户可以通过修改用户目录下的 .condarc 文件。

Windows 用户无法直接创建名为 .condarc 的文件,可先执行 conda config --set show_channel_urls yes 生成该文件之后再修改。

阿里源

channels:
  - defaults
show_channel_urls: true
default_channels:
  - http://mirrors.aliyun.com/anaconda/pkgs/main
  - http://mirrors.aliyun.com/anaconda/pkgs/r
  - http://mirrors.aliyun.com/anaconda/pkgs/msys2
custom_channels:
  conda-forge: http://mirrors.aliyun.com/anaconda/cloud
  msys2: http://mirrors.aliyun.com/anaconda/cloud
  bioconda: http://mirrors.aliyun.com/anaconda/cloud
  menpo: http://mirrors.aliyun.com/anaconda/cloud
  pytorch: http://mirrors.aliyun.com/anaconda/cloud
  simpleitk: http://mirrors.aliyun.com/anaconda/cloud
ssl_verify: false

清华源 

channels:
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
show_channel_urls: true
default_channels:
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - http://mirrors.tuna.tsinghua.edu.cn/
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值