目录

conda-安装软件报错-Found-conflicts-Looking-for-incompatible-packages.

conda 安装软件报错 Found conflicts! Looking for incompatible packages.

问题描述:

利用 conda 安装某包

conda install -c "nvidia/label/cuda-11.8.0" cuda-nvcc

时发现报错:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \ 
Found conflicts! Looking for incompatible packages.                                    failed                                                                                     

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versionsThe following specifications were found to be incompatible

具体来说:

Found conflicts! Looking for incompatible packages.


解决方案:

  1. 博客【 】认为是镜像的问题,在报错的服务器添加国内镜像或者升级一些特定库。
  2. 以上方法均对本人无效,经过排查发现,是因为之前删除 conda 环境时未删除干净,导致新建的该环境里依旧识别到原来同名环境里的库。采用 pip list 发现了很多尚未安装的库。解决方法是首先退出当前激活的虚拟环境,使用 conda deactivate 命令。然后,使用 conda remove -n your_env_name --all 命令来删除指定的虚拟环境。请将 your_env_name 替换为你要删除的虚拟环境的名称。 --all 一定不能省略,否则卸载之后可能还会存在原环境的文件夹,导致用此名称再次新建环境时发生冲突。