Seven.L
Seven.L

Reputation: 93

python3 failed to import cv2

I used python2.7, and have installed opencv, I import cv2 successfully while use python2.7. But when I tried to use python3.4 to import cv2, it said No module named 'cv2',how can I import cv2 with python3

enter image description here

Upvotes: 0

Views: 3071

Answers (1)

Megan Hardy
Megan Hardy

Reputation: 397

You will need to install openCV for python3 - you can specify which version of python you'd like to use:

for python3:

python3 -m pip install opencv-python

for python2.7:

python2.7 -m pip install opencv-python

Upvotes: 5

Related Questions