执行:
conda create -n env_name_xxx python=3.7.7 -y
报错:
CondaValueError: prefix already exists
用 conda info --envs
查看却没有env_name_xxx
这个环境
解决方法:
直接删除目录:rm -r /home/xxx/miniconda3/envs/env_name_xxx
就好了。
以下为debug尝试:
尝试force:
conda create --force -n env_name_xxx python=3.7.7 -y
依旧报错:
CondaValueError: prefix already exists: /home/xxx/miniconda3/envs/env_name_xxx
4.8.1的conda用force没用。
尝试移除:
conda remove --name Hulk_Beta --all
报错:
Remove all packages in environment /home/xxx/miniconda3/envs/env_name_xxx:
CorruptedEnvironmentError: The target environment has been corrupted. Corrupted environments most commonly
occur when the conda process is force-terminated while in an unlink-link
transaction.
environment location: //home/xxx/miniconda3/envs/env_name_xxx
corrupted file: /home/xxx/miniconda3/envs/env_name_xxx/conda-meta/python-3.7.7-hcff3b4d_5.json
尝试修复:
/home/xxx/miniconda3/bin/conda update --all -y
修复完也没什么用