Panas Tiwari
Panas Tiwari

Reputation: 83

No module named 'cv2' during importing in python

I followed the instructions to install opencv in ubuntu from the link https://linuxize.com/post/how-to-install-opencv-on-ubuntu-18-04/#disqus_thread.

The module is installed properly. But when I import it in python I get the error "No module named 'cv2'" What can I do?

Upvotes: 0

Views: 301

Answers (2)

Ashwani
Ashwani

Reputation: 1480

If you are using Python3:

pip3 install opencv-python

Upvotes: 1

Balraj Ashwath
Balraj Ashwath

Reputation: 1427

To install the latest stable version of opencv-python 4.1.2.30 with pip, use the below command:

pip install opencv-python

Upvotes: 1

Related Questions