我已经安装了OpenCV,但在尝试在Python中导入cv2时,出现了以下错误。在安装/卸载和重新安装TensorFlow之前,导入一直正常。
使用cmake在conda环境中安装了OpenCV。 有什么想法如何解决这个问题吗?
Python 3.10.9 (main, Jan 11 2023, 15:21:40) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/deleeps/anaconda3/envs/zscore/lib/python3.10/site-packages/cv2/__init__.py", line 102, in <module>
bootstrap()
File "/home/deleeps/anaconda3/envs/zscore/lib/python3.10/site-packages/cv2/__init__.py", line 90, in bootstrap
import cv2
ImportError: /lib/x86_64-linux-gnu/libwayland-client.so.0: undefined symbol: ffi_type_uint32, version LIBFFI_BASE_7.0
>>>
$ ldconfig -p | grep libwayland-client
libwayland-client.so.0 (libc6,x86-64) => /lib/x86_64-linux-gnu/libwayland-client.so.0
libwayland-client.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libwayland-client.so
libwayland-client++.so.0 (libc6,x86-64) => /lib/x86_64-linux-gnu/libwayland-client++.so.0