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
新手
2,675 檢視

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 積分
4 回應
Aznie_Intel
主席
2,614 檢視

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


STATEABC
新手
2,606 檢視

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

Aznie_Intel
主席
2,543 檢視

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


Aznie_Intel
主席
2,383 檢視

Hi Stateabc,


Thank you for your question. If you need any additional information from Intel, please submit a new question as this thread is no longer being monitored.



Regards,

Aznie


回覆