2

So I've been working with the Movidius neural network api, and it automatically installs several packages on the raspberry pi when you run the installer, including opencv. However, when I try to

import cv2

I get the error

from .cv2 import *
ImportError: libQtGui.so.4: cannot open shared object file: No such file or directory

does anyone know how to fix this?

2 Answers 2

5

Assuming you are using Ubuntu mate or Raspbian stretch OS with python3.

If you are still facing issue with importing cv2, Try to install the following.

pip3 install opencv-python
sudo apt install libqtgui4
sudo apt install libqt4-test

This will pull all the dependencies and you can import cv2 without any issues.

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

Comments

0

You might have done some system changes which led to the path mismatch of libQtGui. there are steps to solve this problem but it will take more time than installing OpenCV again with the configured libQtGui path. So I suggest you install your open cv version again. below is the link to install OpenCV from scratch it hardly takes 20 minutes. https://www.pyimagesearch.com/2018/05/28/ubuntu-18-04-how-to-install-opencv/

Comments

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.