MO: ensure ngraph.frontend is installed (#6698)

MO: when finding IE/nGraph - add search path to beginning of PYTHONPATH, LD_LIBRARY_PATH
This commit is contained in:
Mikhail Nosov 2021-07-21 14:18:51 +03:00 committed by GitHub
parent ecb5499702
commit fbd0d8beba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -58,6 +58,7 @@ def import_core_modules(silent: bool, path_to_module: str):
import openvino # pylint: disable=import-error,no-name-in-module
import ngraph # pylint: disable=import-error,no-name-in-module
import ngraph.frontend # pylint: disable=import-error,no-name-in-module
if silent:
return True

View File

@ -26,10 +26,10 @@ def setup_env(module="", libs=[]):
:param module: path to python module
:param libs: list with paths to libraries
"""
os.environ[python_path_key] = os.pathsep.join([os.environ[python_path_key], module])
os.environ[lib_env_key] = os.pathsep.join([os.environ[lib_env_key], *libs])
os.environ[python_path_key] = os.pathsep.join([module, os.environ[python_path_key]])
os.environ[lib_env_key] = os.pathsep.join([*libs, os.environ[lib_env_key]])
if not os.getenv("OV_FRONTEND_PATH"):
os.environ["OV_FRONTEND_PATH"] = os.pathsep.join([os.environ[lib_env_key], *libs])
os.environ["OV_FRONTEND_PATH"] = os.pathsep.join([*libs, os.environ[lib_env_key]])
def reset_env():