Added python search path for Conda (#19929)

This commit is contained in:
Ilya Lavrenov 2023-10-03 22:47:52 +04:00 committed by GitHub
parent 379ff62575
commit 749ed9dec7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,9 +18,12 @@ def _add_openvino_libs_to_search_path() -> None:
# If you're using a custom installation of openvino,
# add the location of openvino dlls to your system PATH.
openvino_libs = []
# looking for the libs in the pip installation path.
if os.path.isdir(os.path.join(os.path.dirname(__file__), "libs")):
# looking for the libs in the pip installation path.
openvino_libs.append(os.path.join(os.path.dirname(__file__), "libs"))
elif os.path.isdir(os.path.join(os.path.dirname(__file__), "..", "..", "..", "Library", "bin")):
# looking for the libs in the conda installation path
openvino_libs.append(os.path.join(os.path.dirname(__file__), "..", "..", "..", "Library", "bin"))
else:
# setupvars.bat script set all libs paths to OPENVINO_LIB_PATHS environment variable.
openvino_libs_installer = os.getenv("OPENVINO_LIB_PATHS")