Ubuntu server版本自定义安装Python出错
Traceback (most recent call last):
File "scripts/im2rec.py", line 30, in <module>
import cv2
File "/home/zx/cnocr/myEnv/lib/python3.7/site-packages/cv2/__init__.py", line 5, in <module>
from .cv2 import *
ImportError: libSM.so.6: cannot open shared object file: No such file or directory
解决办法
1.卸载错误版本
pip uninstall opencv-python
2.安装新包
pip install opencv-python-headless
可以参考
stackoverflow