Conda安装报错Unknown dependency 'pin-1',无法降级libffi至3.3的问题求助
Conda安装报错Unknown dependency 'pin-1',无法降级libffi至3.3的问题求助
我正在尝试降级libffi=3.3来解决遇到的一个bug(详情见文末),执行了以下conda命令:
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求解器为什么还在抱怨“pin-1”及其对Python 3.11的依赖要求呢?
我遇到的这个bug是由pystata触发的,根据相关解决方案提示,降级Python和libffi可以解决该问题,报错的回溯信息如下:
Traceback (most recent call last): File "/usr/local/stata18/utilities/pystata/config.py", line 239, in init stlib = cdll.LoadLibrary(lib_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "~/anaconda3/envs/mismatch/lib/python3.12/ctypes/__init__.py", line 460, in LoadLibrary return self._dlltype(name) ^^^^^^^^^^^^^^^^^^^ File "~/anaconda3/envs/mismatch/lib/python3.12/ctypes/__init__.py", line 379, in __init__ self._handle = _dlopen(self._name, mode) ^^^^^^^^^^^^^^^^^^^^^^^^^ OSError: /usr/lib/x86_64-linux-gnu/libp11-kit.so.0: undefined symbol: ffi_type_pointer, version LIBFFI_BASE_7.0 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/snap/pycharm-professional/378/plugins/python/helpers/pydev/pydevd.py", line 1534, in _exec pydev_imports.execfile(file, globals, locals) # execute the script ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/snap/pycharm-professional/378/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "main.py", line 17, in <module> config.init('be') File "/usr/local/stata18/utilities/pystata/config.py", line 241, in init
备注:内容来源于stack exchange,提问作者FooBar
相关产品推荐
相关产品推荐

