这个问题,网上的解决方案大多数都是apt-get安装libSM,但是由于我这里不方便使用包安装,所以发现可以使用pip install opencv-python-headless 安装无需图形依赖库的opencv。
pip install opencv-python-headless