0

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. Commented Sep 8, 2020 at 19:22
  • BTW. it makes sense to post info about about python version and OpenVINO version. It may help to shed some light on the issue. Commented Sep 8, 2020 at 19:23

2 Answers 2

1

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).

Sign up to request clarification or add additional context in comments.

Comments

0

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

3 Comments

The problem is it’s already installed, so its quite strange that its not working
I think there was an error while installing , I recommend you to re- install it!
I just tryed it, but unfortunately it didn`t help me

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.