Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

ModuleNotFoundError: No module named 'cv2'

STATEABC
Beginner
243 Views

When I run the demo in open_model_zoo, ModuleNotFoundError: No module named 'cv2' appears

 

Here are my operations:

source env.sh (including setupvars.sh, etc.)

jtagdir=$COREDLA_WORD/runtime/build_Release/fpga_jtag_reprogram

bitsdir=$COREDLA_WORD/demo/bitstreams

$jtagdir=/fpga_jtag_reprogram $bitsdir/AGX7_Performance.sof

curarch=$COREDLA_ROOT/example_architectures/AGX7_Performance.arch

Then run the script

 

But I installed opencv, and can run the demo without activating the environment

 

Any help would be greatly appreciated, thank you

0 Kudos
3 Replies
Aznie_Intel
Moderator
182 Views

Hi Stateabc,

 

Thanks for reaching out. Which Open Model Zoo demo are you running? Usually, the error will arise when your Python environment cannot find the OpenCV package.

 

How did you install your OpenCV and what version are you using?

To install OpenCV, run pip install opencv-python

 

 

Regards,

Aznie


0 Kudos
STATEABC
Beginner
174 Views

Hello,
I am running instance_setmentation_demo, my python environment can find opencv, when I run the following command in the terminal:
python3
>import cv2
>print(cv2.__version__)
it will print 4.10.0

If I don't activate the environment env and run the demo, the demo can run normally, which makes me very strange.

Thanks for your help

0 Kudos
Aznie_Intel
Moderator
111 Views

Hi Stateabc,

 

Are you able to run the same command in OpenVINO environment? If you have multiple versions of python or OpenCV, try to uninstall it first. Then, install again the opencv-python version. The error might happen due to multiple versions of OpenCV in your system.

 

 

Regards,

Aznie


0 Kudos
Reply