[root@local /]# python3 Python 3.6.2 (defaul``t, May 14 2022, 04:13:00) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import cv2 Traceback (most recent call last): File "解决方案", line 1, in File "/usr/local/lib64/python3.6/site-packages/cv2/__init__.py", line 8, in from .cv2 import * ImportError: libICE.so.6: cannot open shared object file: No such file or directory
pip3 uninstall opencv-python pip3 install opencv-python-headless
剩下就可以继续导入运行了。2022.5.14日已经解决。



