[英]python3 failed to import cv2
I used python2.7, and have installed opencv, I import cv2 successfully while use python2.7. 我使用python2.7,并已安装opencv,使用python2.7时成功导入了cv2。 But when I tried to use python3.4 to import cv2, it said No module named 'cv2',how can I import cv2 with python3
但是当我尝试使用python3.4导入cv2时,它说没有名为“ cv2”的模块,我如何使用python3导入cv2
You will need to install openCV for python3 - you can specify which version of python you'd like to use: 您将需要为python3安装openCV-您可以指定要使用的python版本:
for python3: 对于python3:
python3 -m pip install opencv-python
for python2.7: 对于python2.7:
python2.7 -m pip install opencv-python
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.