Skip To Main Content
Support Knowledge Base

Unable to Run OpenCV* in OpenVINO™ Docker

Content Type: Troubleshooting   |   Article ID: 000091786   |   Last Reviewed: 02/17/2023

Description

  • Ran the command:

    docker run -ditu root:root --name=openvino -h "openvino" --privileged \
    --device /dev/dri:/dev/dri \
    -v /docker-share/public:/public \
    openvino/ubuntu20_dev:latest

  • Used a Python* inferencing script that contains OpenCV* function.

    cv2.VideoCapture return (false, none)

Resolution

  • Check whether the system really had installed the OpenCV*: pip show opencv or pip show opencv-python
  • Install the OpenCV*: pip install opencv-python
  • Or using Linux*, run the command:

    sudo apt update
    sudo apt install python3-opencv

  • Verify the OpenCV* installation:

    python3 -c "import cv2; print(cv2.__version__)"

Related Products

This article applies to 3 products.
Intel® Xeon Phi™ Processor Software OpenVINO™ toolkit Performance Libraries