本文最后更新于 1360 天前,其中的信息可能已经有所发展或是发生改变。
前几天自己电脑上装 vmd 遇到了这个问题,今天在服务器上装 gromacs,又遇到了,解决也挺好解决,记录一下。
就像下面这样
(base) shpc_fa71fadadf@SHPC-Basic-3:~$ conda install gromacs=2019.1
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
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.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versions
Package _libgcc_mutex conflicts for:
python=3.8 -> libgcc-ng[version='>=7.3.0'] -> _libgcc_mutex=[build=main]
gromacs=2019.1 -> libgcc-ng[version='>=7.3.0'] -> _libgcc_mutex=[build=main]
Package libgcc-ng conflicts for:
python=3.8 -> zlib[version='>=1.2.11,<1.3.0a0'] -> libgcc-ng[version='>=7.2.0']
python=3.8 -> libgcc-ng[version='>=7.3.0']
Package libstdcxx-ng conflicts for:
python=3.8 -> libstdcxx-ng[version='>=7.3.0']
python=3.8 -> libffi[version='>=3.2.1,<3.3a0'] -> libstdcxx-ng[version='>=7.2.0']
原因
conda 应该是适配当前环境下各个包之间的依赖关系来安装软件包的
有时候 conda 安装软件时会有一些依赖冲突
解决方法
依次执行以下操作,每执行一步就可以去 conda install 一下,可以安装了其实就不必进行后续命令了(当然如果你像我一样强迫症都喜欢用最新的包那直接全走一套也无所谓。。)
- 更新 conda 所有包
conda update --all
- 更新 conda
# /home/limin/anaconda3 为自己的 anaconda 安装目录
conda update --prefix /home/limin/anaconda3 anaconda
- 添加 conda-forge 平台
# 服务器在国外的话
conda config --add channels conda-forge
# 中国境内直接用清华源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/