PaddleOCR python3如不关闭./paddle/dataset/image.py中的cv2线程导入,编译生成exe后会开一堆.exe进程导致卡死

0yg35tkg  于 2023-02-04  发布在  Python
关注(0)|答案(2)|浏览(262)
import subprocess
    import sys
    import_cv2_proc = subprocess.Popen(
        [sys.executable, "-c", "import cv2"],
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE)
    out, err = import_cv2_proc.communicate()
    retcode = import_cv2_proc.poll()
    if retcode != 0:
        cv2 = None
    else:
        import cv2
else:
    try:
        import cv2
    except ImportError:
        cv2 = None```python
eufgjt7s

eufgjt7s1#

感谢反馈,方便提交一个issue到框架的repo吗?会有相关同学跟进: https://github.com/PaddlePaddle/Paddle/issues

相关问题