conda list报错AttributorError

conda list报错AttributeError: 'PythonInstalledDistribution' object has no attribute 'get_conda_dependencies',conda 是正常的

img

这个错误一般是由于 PythonInstalledDistribution 模块的版本与 conda 的版本不兼容造成的。

可以尝试更新 PythonInstalledDistribution 模块,方法如下:

  1. 打开命令行终端,激活 conda 环境;
  2. 执行以下命令更新 PythonInstalledDistribution 模块:
conda update python

如果更新后仍然出现错误,可以考虑重新安装 conda 或者使用其他版本的 PythonInstalledDistribution 模块。