Skip to content

Commit 9af5099

Browse files
authored
AC: install opencv headless as default if not opencv in environment (#3528)
1 parent d2d21ff commit 9af5099

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

tools/accuracy_checker/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,18 @@ python setup.py install_core
104104

105105
#### Installation Troubleshooting
106106

107-
When previous version of the tool is already installed in the environment, in some cases, it can broke the new installation.
107+
1. When previous version of the tool is already installed in the environment, in some cases, it can broke the new installation.
108108
If you get a directory/file not found error, try manually removing the previous tool version from your environment or install the tool using following command in Accuracy Checker directory instead of setup.py install:
109109

110110
```bash
111111
pip install --upgrade --force-reinstall .
112112
```
113+
2. If `accuracy_check` command failed with following error:
114+
```
115+
from .cv2 import *
116+
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
117+
```
118+
try to uninstall `opencv-python` and install `opencv-python-headless` package. More detils about the error and approaches how to fix can be found [here](https://github.com/opencv/opencv-python/issues/370)
113119

114120
#### Running the Tool inside IDE for Development Purposes
115121

tools/accuracy_checker/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ def prepare_requirements():
101101
except ImportError as opencv_import_error:
102102
if platform.processor() != 'aarch64':
103103
warnings.warn(
104-
"Problem with cv2 import: \n{}\n opencv-python will be added to requirements".format(opencv_import_error)
104+
"Problem with cv2 import: \n{}\n opencv-python-headless will be added to requirements".format(opencv_import_error)
105105
)
106-
_requirements.append('opencv-python')
106+
_requirements.append('opencv-python-headless')
107107
else:
108108
warnings.warn(
109109
"Problem with cv2 import: \n{}".format(opencv_import_error)

0 commit comments

Comments
 (0)