diff --git a/modules/launch_utils.py b/modules/launch_utils.py index 0178e1b0f..c9e4344be 100644 --- a/modules/launch_utils.py +++ b/modules/launch_utils.py @@ -194,7 +194,7 @@ def run_extension_installer(extension_dir): try: env = os.environ.copy() - env['PYTHONPATH'] = f"{os.path.abspath('.')}{os.pathsep}{env['PYTHONPATH']}" + env['PYTHONPATH'] = f"{os.path.abspath('.')}{os.pathsep}{env.get('PYTHONPATH', '')}" print(run(f'"{python}" "{path_installer}"', errdesc=f"Error running install.py for extension {extension_dir}", custom_env=env)) except Exception as e: