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
2条答案
按热度按时间eufgjt7s1#
感谢反馈,方便提交一个issue到框架的repo吗?会有相关同学跟进: https://github.com/PaddlePaddle/Paddle/issues
ve7v8dk22#
好的