Anaconda 使用 create 和 install 命令报错:Expecting property name enclosed in double quotes: line 1 column 4

博主在win10系统重新安装Anaconda 4.9.2搭建tensorflow 2.0环境时,执行指令报错。网上给出两种解决办法,一是用conda clean -i命令移除index cache,博主尝试无效;二是删除.condarc文件,博主尝试后成功解决问题。

本人按照网上的指导,重新安装了Anaconda 4.9.2,win10(64 bit),想重新搭建tensorflow 2.0的环境,但是在执行

conda create -n tensorflow

以及

conda install jupyter notebook

指令时总是报错

json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 40 (char 40)

google一下可以找到类似的问题:https://github.com/conda/conda/issues/9590

其中提到两种解决办法:

1.执行

conda clean -i

原因如下: 

我也遇到了同样的问题,发现并不需要删除或者修改.condarc文件。看起来这个问题是channels的索引json文件出错导致的,我用conda clean -i命令移除了index cache,然后正常了。
I also encountered the same problem and found that there was no need to delete or modify the .condarc file. It seemed that the problem was caused by an error in the indexing JSON file of Channels. I removed the index cache using the conda clean-i command and it worked fine.

 经过尝试,没有效果

2.删除 .condarc 文件

执行

conda config --show-sources

找到.condarc 文件位置并删除它

具体操作可见:https://stackoverflow.com/questions/61134985/conda-install-packages-error-collecting-package-metadata-current-repodata-json/61147979#61147979https://groups.google.com/a/continuum.io/g/anaconda/c/jYvejE31PUk

经过尝试,成功

评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值