Skip to content

Commit e4ca2c8

Browse files
lfl1337claude
andcommitted
fix(launch): add --no-build-isolation to open_clip and requirements installs
Commit 76759a1 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 <noreply@anthropic.com>
1 parent 1937682 commit e4ca2c8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

modules/launch_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ def ensure_build_dependencies():
443443
startup_timer.record("install clip")
444444

445445
if not is_installed("open_clip"):
446-
run_pip(f"install {openclip_package}", "open_clip")
446+
run_pip(f"install --no-build-isolation {openclip_package}", "open_clip")
447447
startup_timer.record("install open_clip")
448448

449449
if (not is_installed("xformers") or args.reinstall_xformers) and args.xformers:
@@ -468,14 +468,14 @@ def ensure_build_dependencies():
468468
requirements_file = os.path.join(script_path, requirements_file)
469469

470470
if not requirements_met(requirements_file):
471-
run_pip(f"install -r \"{requirements_file}\"", "requirements")
471+
run_pip(f"install --no-build-isolation -r \"{requirements_file}\"", "requirements")
472472
startup_timer.record("install requirements")
473473

474474
if not os.path.isfile(requirements_file_for_npu):
475475
requirements_file_for_npu = os.path.join(script_path, requirements_file_for_npu)
476476

477477
if "torch_npu" in torch_command and not requirements_met(requirements_file_for_npu):
478-
run_pip(f"install -r \"{requirements_file_for_npu}\"", "requirements_for_npu")
478+
run_pip(f"install --no-build-isolation -r \"{requirements_file_for_npu}\"", "requirements_for_npu")
479479
startup_timer.record("install requirements_for_npu")
480480

481481
if not args.skip_install:

0 commit comments

Comments
 (0)