AnswerBun.com

OpenCV: Error - Module not found -(on IDLE)

Ask Ubuntu Asked on December 8, 2020

I have installed OpenCV on Ubuntu 18.04. The python installation is using conda(screenshot attached)

I can import OpenCV from terminal and jupyter notebooks import on terminal and work with it.

Now I am using IDLE for my work and, want to import cv2 on it but it is showing "ModuleNotFoundError" on the same code.

To check for installed packages, I tried both pip list (pip package list) and conda list(conda list).

I have also done sudo apt-get install opencv and pip install opencv.

My opinion is that there is some problem with the path and/or environment in which OpenCV is installed(I may be wrong). I couldn’t decipher which file should be placed where to make this work.

In summary:

  1. I have OpenCV installed on my Ubuntu 18.04 system but I am not able to import it on IDLE.
  2. I want to be able to access it from python files created with IDLE.
  3. Please do explain why is this happening in first place and if possible, explain the solution in detail.

Please do write in comment if more information is required(and how can I access it) and I’ll be happy to post it.

Since this is my first question, the site is not allowing me to upload images here and instead, providing links to uploaded images from Imgur. I am sorry for the inconvenience.

Thanks!

One Answer

You need to install opencv-python.

pip3 install opencv-python

Answered by KK Patel on December 8, 2020

Add your own answers!

Related Questions

It is posibble to Expand memory with SSD?

1  Asked on December 24, 2021

 

Ubuntu does not use Nvidia GPU

0  Asked on December 24, 2021 by bless

       

How to create barcode in Ubuntu via a GUI?

6  Asked on December 23, 2021 by maythux

   

Revert/Prevent hostname change

3  Asked on December 23, 2021 by user3240383

     

Ubuntu 18.04 logon screen touchpad buttons not working

0  Asked on December 23, 2021 by michael-mcandrew

     

Restart desktop without losing programs?

2  Asked on December 23, 2021 by catman

     

systemd service stuck on “deactivating”

1  Asked on December 23, 2021 by falsepockets

     

Execute a bash file by double clicking

2  Asked on December 23, 2021 by boniface316

     

My Bluetooth stopped working for seemingly no reason

1  Asked on December 23, 2021 by picklejar05

   

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir