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.
6594 ディスカッション

ModuleNotFoundError: No module named 'cv2'

STATEABC
初心者
2,235件の閲覧回数

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,174件の閲覧回数

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,166件の閲覧回数

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,103件の閲覧回数

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
モデレーター
1,943件の閲覧回数

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


返信