recursion is detected during loading of “cv2” binary extensions

报错如下

importError: ERROR: recursion is detected during loading of “cv2” binary extensions. Check OpenCV installation.

使用版本 linux 需要使用无头版本 4.7.0.72

  • python 3.8
  • opencv-python==4.7.0.72;sys_platform!="linux"
  • opencv-python-headless4.7.0.72;sys_platform"linux"

降低版本 4.5.3.56

pip install opencv-python=4.5.3.56

具体原理

为其保留了二进制兼容性。所以,4.5.3.56以后的的库无需再次进行编译即可直接使用
posted @ 2023-10-08 17:56  vx_guanchaoguo0  阅读(334)  评论(0编辑  收藏  举报