sml2h3 / ddddocr

带带弟弟 通用验证码识别OCR pypi版
https://ddddocr.com
MIT License
9.17k stars 1.67k forks source link

opencv-python的依赖可否换为opencv-python-headless #38

Closed caspershw closed 2 years ago

caspershw commented 2 years ago

此处是opencv-python-headless的介绍

These packages are smaller than the two other packages above because they do not contain any GUI functionality (not compiled with Qt / other GUI components). This means that the packages avoid a heavy dependency chain to X11 libraries and you will have for example smaller Docker images as a result. You should always use these packages if you do not use cv2.imshow et al. or you are using some other package (such as PyQt) than OpenCV to create your GUI. Option 3 - Headless main modules package: pip install opencv-python-headless Option 4 - Headless full package (contains both main modules and contrib/extra modules): pip install opencv-contrib-python-headless (check contrib/extra modules listing from OpenCV documentation)

sml2h3 commented 2 years ago

建议是暂时不动,因为有的用户是在本机会做测试,会通过例如cv2.imshow()等方法做对比,如果直接使用opencv-python-headless那么imshow()方法就会失效,当然如果你想在服务器端部署的时候用opencv-python-headless,可以在安装完ddddocr后,先pip uninstall opencv-python再pip install opencv-python-headless