0
votes

I try to run the python script using OpenVINO, so I write "setupvars" and run a script by command line as "python main.py".

It tells me this:

Traceback (most recent call last): File "main.py", line 1, in import cv2 ImportError: DLL load failed while importing cv2: Module not found. If I run the script not initializing OpenVINO

It works properly. What is my problem, guys?

Thank you for your answers

2
OpenCV is a part of the OpenVINO package. It means if everything is installed and set up properly it should work. Your OS is Windows, isn't it? if so please follow the steps from the section 'Set the Environment Variables 'docs.openvinotoolkit.org/latest/… Please make sure that set up environment variable and running the python script happens in the same session.Artemy Skrebkov
BTW. it makes sense to post info about about python version and OpenVINO version. It may help to shed some light on the issue.Artemy Skrebkov

2 Answers

1
votes

Can you show us your python setup?

try:

python3 --version

and then try

pip3 freeze

If you do not see opencv in that list, it means it was not installed properly.

I had the same issue as I was using Python 3.8+ and apparently they don't support that. Right now OpenVINO supports only from 3.5-3.7.

Also, you should not need to install the opencv again using the pip install command. If anything, you should reinstall the OpenVINO toolkit again after you got Python 3.7 or so installed. (You can reinstall by re-running the toolkit installer again).

0
votes

You need to install OpenCV module at python terminal go to the window termianal and command

'''
pip install opencv-python
'''

then you can try your script again