openvino-dev uses opencv-python-headless as default (#12558)
This commit is contained in:
1 parent
5a037dedbc
commit
8c1a3bab25
3 files changed
+11
-3
No files matched your search
Vendored
+1
-1
Submodule thirdparty/open_model_zoo updated: d2d21ff318...9af5099f0a.
@@ -1,4 +1,3 @@
|
||||
py-cpuinfo>=7.0.0
|
||||
numpy>=1.16.6,<=1.23.1
|
||||
progress>=1.5
|
||||
opencv-python==4.5.*
|
||||
progress>=1.5
|
||||
@@ -8,7 +8,9 @@ Use this script to create a wheel with OpenVINO™ Python* tools:
|
||||
|
||||
$ python setup.py sdist bdist_wheel
|
||||
"""
|
||||
import importlib
|
||||
import pkg_resources
|
||||
import warnings
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
with open('README.md', 'r', encoding='utf-8') as f:
|
||||
@@ -21,6 +23,13 @@ with open('requirements.txt') as requirements_txt:
|
||||
in pkg_resources.parse_requirements(requirements_txt)
|
||||
]
|
||||
|
||||
try:
|
||||
importlib.import_module('cv2')
|
||||
except ImportError as opencv_import_error:
|
||||
warnings.warn(
|
||||
"Problem with cv2 import: \n{}\n opencv-python-headless will be added to requirements".format(opencv_import_error)
|
||||
)
|
||||
reqs.append('opencv-python-headless==4.5.*')
|
||||
|
||||
setup(
|
||||
name='benchmark_tool',
|
||||
|
||||
Reference in new issue
Block a user