本人按照网上的指导,重新安装了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#61147979和https://groups.google.com/a/continuum.io/g/anaconda/c/jYvejE31PUk
经过尝试,成功