Skip to content

Cannot import cv2 in either python 3.9 or 3.8 of the openvino_cg_dev_2025.1.0.dockerfile #324

@geokal

Description

@geokal

Hi! I used docker pull openvino/ubuntu20_dev image to run : docker run --platform=linux/amd64 -it --rm openvino/ubuntu20_dev:latest /bin/bash -c "python3 samples/python/hello_query_device/hello_query_device.py" , but when I tried to run python3.8 or python3.9 and import cv2, I got the following: `openvino@5aaf45edc5ee:/opt/intel/openvino_2025.1.0.0$ python3.9
Python 3.9.5 (default, Nov 23 2021, 15:27:38)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import cv2
Traceback (most recent call last):
File "", line 1, in
File "/opt/intel/openvino/extras/opencv/python/cv2/init.py", line 181, in
bootstrap()
File "/opt/intel/openvino/extras/opencv/python/cv2/init.py", line 112, in bootstrap
load_first_config([
File "/opt/intel/openvino/extras/opencv/python/cv2/init.py", line 109, in load_first_config
raise ImportError('OpenCV loader: missing configuration file: {}. Check OpenCV installation.'.format(fnames))
ImportError: OpenCV loader: missing configuration file: ['config-3.9.py', 'config-3.py']. Check OpenCV installation.`. My question in can use opencv provided by the Opnevino ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions