conda创建环境报错 failed with repodata from current_repodata.json

该文章已生成可运行项目,

conda创建环境报错

conda create --name cortexode python=3.8
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.

尝试了如下解决方案均无效

# 1:更新 Conda 
conda update -n base -c defaults conda -y
# 2:切换 Conda 镜像源
conda create --name cortexode python=3.8 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main -y

查看bug日志

conda create --name cortexode python=3.8 -y --debug
DEBUG conda.core.subdir_data:_load(390): 304 NOT MODIFIED for 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/noarch/repodata.json'. Updating mtime and loading from disk
DEBUG conda.core.subdir_data:_read_pickled(455): found pickle file /root/miniconda3/pkgs/cache/0240b227.q
DEBUG conda.core.subdir_data:_load(321): No local cache found for https://repo.anaconda.com/pkgs/main/linux-64/repodata.json at /root/miniconda3/pkgs/cache/47929eba.json
DEBUG urllib3.connectionpool:_new_conn(971): Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG urllib3.connectionpool:_make_request(452): https://repo.anaconda.com:443 "GET /pkgs/main/linux-64/repodata.json HTTP/1.1" 200 None

因此

#1. 清除 Conda 缓存
conda clean --all -y
#2. 关闭 Conda 的 repodata.json 处理优化
conda create --name cortexode python=3.8 --repodata-fn=repodata.json -y

成功解决

本文章已经生成可运行项目
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值