diff --git a/mmengine/config/utils.py b/mmengine/config/utils.py index 36f07466b2..8c337298c7 100644 --- a/mmengine/config/utils.py +++ b/mmengine/config/utils.py @@ -9,7 +9,7 @@ from typing import List, Optional, Tuple, Union from mmengine.fileio import load -from mmengine.utils import check_file_exist +from mmengine.utils import check_file_exist, digit_version PYTHON_ROOT_DIR = osp.dirname(osp.dirname(sys.executable)) @@ -176,7 +176,8 @@ def _is_builtin_module(module_name: str) -> bool: return False origin_path = osp.abspath(origin_path) if ('site-package' in origin_path or 'dist-package' in origin_path - or not origin_path.startswith(PYTHON_ROOT_DIR)): + or not origin_path.startswith( + (PYTHON_ROOT_DIR, '/usr/lib/python'))): return False else: return True