From e4ca2c8ec0a5498e386c065fedffab3e0689fd84 Mon Sep 17 00:00:00 2001 From: Ninym Date: Mon, 13 Apr 2026 14:14:12 +0200 Subject: [PATCH] fix(launch): add --no-build-isolation to open_clip and requirements installs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 76759a18 added --no-build-isolation to the clip install to fix BackendUnavailable errors with pip 26+ on embedded/portable Python environments, but the same flag was missing from open_clip and the requirements installs. open_clip (GitHub ZIP) and jsonmerge (in requirements_versions.txt) are source distributions that pip must build. With pip 26+, the isolated build environment fails to import setuptools.build_meta, causing: BackendUnavailable: Cannot import 'setuptools.build_meta' Adding --no-build-isolation to these calls mirrors the existing fix for clip and allows pip to use the already-installed setuptools (69.5.1, pinned in requirements_versions.txt) directly. Fixes startup failures on portable/embedded Python 3.10.6 installs (e.g. sd.webui one-click package) with pip 26+. Related: #17201 #17284 #17287 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- modules/launch_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/launch_utils.py b/modules/launch_utils.py index 804b802057a..f689b92bf21 100644 --- a/modules/launch_utils.py +++ b/modules/launch_utils.py @@ -443,7 +443,7 @@ def ensure_build_dependencies(): startup_timer.record("install clip") if not is_installed("open_clip"): - run_pip(f"install {openclip_package}", "open_clip") + run_pip(f"install --no-build-isolation {openclip_package}", "open_clip") startup_timer.record("install open_clip") if (not is_installed("xformers") or args.reinstall_xformers) and args.xformers: @@ -468,14 +468,14 @@ def ensure_build_dependencies(): requirements_file = os.path.join(script_path, requirements_file) if not requirements_met(requirements_file): - run_pip(f"install -r \"{requirements_file}\"", "requirements") + run_pip(f"install --no-build-isolation -r \"{requirements_file}\"", "requirements") startup_timer.record("install requirements") if not os.path.isfile(requirements_file_for_npu): requirements_file_for_npu = os.path.join(script_path, requirements_file_for_npu) if "torch_npu" in torch_command and not requirements_met(requirements_file_for_npu): - run_pip(f"install -r \"{requirements_file_for_npu}\"", "requirements_for_npu") + run_pip(f"install --no-build-isolation -r \"{requirements_file_for_npu}\"", "requirements_for_npu") startup_timer.record("install requirements_for_npu") if not args.skip_install: