我正在尝试降级 libffi=3.3,因为我读到当前版本可能是我遇到错误的原因。
conda install libffi==3.3 -n mismatch
Channels:
- defaults
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: \ warning libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE
failed
LibMambaUnsatisfiableError: Encountered problems while solving:
- package python-3.11.8-h955ad1f_0 requires libffi >=3.4,<3.5, but none of the providers can be installed
Could not solve for environment specs
The following packages are incompatible
├─ libffi 3.3 is requested and can be installed;
├─ matplotlib is installable with the potential options
│ ├─ matplotlib [3.6.2|3.7.1|3.7.2] would require
│ │ └─ matplotlib-base [>=3.6.2,<3.6.3.0a0 |>=3.7.1,<3.7.2.0a0 |>=3.7.2,<3.7.3.0a0 ] with the potential options
│ │ ├─ matplotlib-base [3.6.2|3.7.1|3.7.2] would require
│ │ │ └─ python >=3.11,<3.12.0a0 , which requires
│ │ │ └─ libffi >=3.4,<3.5 , which conflicts with any installable versions previously reported;
│ │ ├─ matplotlib-base [3.6.2|3.7.1|3.7.2] would require
│ │ │ └─ python >=3.10,<3.11.0a0 , which can be installed;
│ │ ├─ matplotlib-base [3.2.1|3.2.2|...|3.7.2] would require
│ │ │ └─ python >=3.8,<3.9.0a0 , which can be installed;
│ │ └─ matplotlib-base [3.3.2|3.6.2|3.7.1|3.7.2] would require
│ │ └─ python >=3.9,<3.10.0a0 , which can be installed;
│ ├─ matplotlib 3.8.0 would require
│ │ └─ python >=3.11,<3.12.0a0 , which cannot be installed (as previously explained);
│ ├─ matplotlib [2.0.2|2.1.0|...|2.2.3] would require
│ │ └─ python >=2.7,<2.8.0a0 , which can be installed;
│ ├─ matplotlib [2.0.2|2.1.0|...|3.0.0] would require
│ │ └─ python >=3.5,<3.6.0a0 , which can be installed;
│ ├─ matplotlib [2.0.2|2.1.0|...|3.3.4] would require
│ │ └─ python >=3.6,<3.7.0a0 , which can be installed;
│ ├─ matplotlib [2.2.2|2.2.3|...|3.5.3] would require
│ │ └─ python >=3.7,<3.8.0a0 , which can be installed;
│ ├─ matplotlib [3.1.1|3.1.2|...|3.7.2] would require
│ │ └─ python >=3.8,<3.9.0a0 , which can be installed;
│ ├─ matplotlib [3.2.1|3.2.2|3.3.1] would require
│ │ └─ matplotlib-base [>=3.2.1,<3.2.2.0a0 |>=3.2.2,<3.2.3.0a0 |>=3.3.1,<3.3.2.0a0 ] with the potential options
│ │ ├─ matplotlib-base [3.2.1|3.2.2|...|3.7.2], which can be installed (as previously explained);
│ │ ├─ matplotlib-base [3.2.1|3.2.2|3.3.1|3.3.2] would require
│ │ │ └─ python >=3.6,<3.7.0a0 , which can be installed;
│ │ └─ matplotlib-base [3.2.1|3.2.2|3.3.1|3.3.2] would require
│ │ └─ python >=3.7,<3.8.0a0 , which can be installed;
│ ├─ matplotlib 3.3.2 would require
│ │ └─ matplotlib-base >=3.3.2,<3.3.3.0a0 , which can be installed (as previously explained);
│ ├─ matplotlib [3.3.4|3.4.2|...|3.8.0] would require
│ │ └─ python >=3.9,<3.10.0a0 , which can be installed;
│ ├─ matplotlib [3.5.0|3.5.1|...|3.8.0] would require
│ │ └─ python >=3.10,<3.11.0a0 , which can be installed;
│ └─ matplotlib 3.8.0 would require
│ └─ python >=3.12,<3.13.0a0 , which can be installed;
└─ pin-1 is not installable because it requires
└─ python 3.11.* , which conflicts with any installable versions previously reported.
(mismatch) :$ conda list python -n mismatch
# packages in environment at /home/x/anaconda3/envs/mismatch:
#
# Name Version Build Channel
python 3.11.8 h955ad1f_0
如你所见,我已经将 python 降级到 3.11——为什么 conda 求解器抱怨“pin1”及其对 python 3.11 的要求?
Conda 不允许在没有显式声明的情况下更改 Python 版本,这就是 pin 的功能。冲突报告显示,没有针对
python=3.11
构建的 libffi <3.4
版本。进一步降级 python
应该可以解决问题,即
conda install -n mismatch python=3.10 libffi=3.3
请注意,
libffi=3.3
已有 3 多年历史,因此 Python 3.11(2022 年 10 月发布)不兼容是有道理的。