diff --git a/mmengine/config/utils.py b/mmengine/config/utils.py index 36f07466b2..9e9f990885 100644 --- a/mmengine/config/utils.py +++ b/mmengine/config/utils.py @@ -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