From 8e8de8881746301bf83a67c8ae58647b9a3e2375 Mon Sep 17 00:00:00 2001 From: Alina Kladieva Date: Thu, 11 Dec 2025 18:36:55 +0100 Subject: [PATCH] Install newer opencv-python on 3.11 opencv-python 4.5 no longer can be installed on Python 3.11 (looks like changes were done on PyPi) --- samples/python/classification_sample_async/requirements.txt | 3 ++- samples/python/hello_classification/requirements.txt | 3 ++- samples/python/hello_reshape_ssd/requirements.txt | 3 ++- tests/constraints.txt | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/samples/python/classification_sample_async/requirements.txt b/samples/python/classification_sample_async/requirements.txt index 15a866656e2b0e..2eeaf8621e5bea 100644 --- a/samples/python/classification_sample_async/requirements.txt +++ b/samples/python/classification_sample_async/requirements.txt @@ -1 +1,2 @@ -opencv-python>=4.5 +opencv-python>=4.5; python_version != "3.11" +opencv-python>=4.6; python_version == "3.11" \ No newline at end of file diff --git a/samples/python/hello_classification/requirements.txt b/samples/python/hello_classification/requirements.txt index 15a866656e2b0e..e3f526286792a8 100644 --- a/samples/python/hello_classification/requirements.txt +++ b/samples/python/hello_classification/requirements.txt @@ -1 +1,2 @@ -opencv-python>=4.5 +opencv-python>=4.5; python_version != "3.11" +opencv-python>=4.6; python_version == "3.11" diff --git a/samples/python/hello_reshape_ssd/requirements.txt b/samples/python/hello_reshape_ssd/requirements.txt index 15a866656e2b0e..e3f526286792a8 100644 --- a/samples/python/hello_reshape_ssd/requirements.txt +++ b/samples/python/hello_reshape_ssd/requirements.txt @@ -1 +1,2 @@ -opencv-python>=4.5 +opencv-python>=4.5; python_version != "3.11" +opencv-python>=4.6; python_version == "3.11" diff --git a/tests/constraints.txt b/tests/constraints.txt index 5f1d59bc901552..0dd63df35b86d4 100644 --- a/tests/constraints.txt +++ b/tests/constraints.txt @@ -12,7 +12,8 @@ wheel>=0.38.1 defusedxml>=0.7.1 tensorflow>=2.5,<2.21.0 requests>=2.25.1 -opencv-python>=4.5 +opencv-python>=4.5; python_version != "3.11" +opencv-python>=4.6; python_version == "3.11" paddlepaddle==2.6.2 protobuf>=3.18.1,<7.0.0 py>=1.9.0