Skip to content

Swarm tries to install Python things outside venv #612

@JS3910

Description

@JS3910

Expected Behavior

I expect installation of fresh SwarmUI to work as intended.

Actual Behavior

When SwarmUI is trying to install the Comfy backend, it's not using any venv so on a system where pip is configured to refuse any install commands outside a venv (which should be all sane/secure python installations) it errors out.

Obviously, neither SwarmUI nor Comfy have any business or use from installing site-wide Python packages, so this is clearly a bug in the installer.

Steps to Reproduce

Set environment variable PIP_REQUIRE_VIRTUALENV=true and try to install with the normal installer script. This is on Windows, have not tested the Linux install script to see if it has the same issue.

Debug Logs

10:48:42.693 [Init] [Installer] Installing prereqs...
10:48:43.875 [Init] [Installer] Prepping ComfyUI's git repo...
10:48:45.150 [Init] [Installer] Ensuring all current Comfy requirements are installed...
10:48:45.649 [Warning] [ComfyUI Install (python requirements)/STDERR] ERROR: Could not find an activated virtualenv (required).
10:48:45.672 [Info] Self-Start ComfyUI Install (python requirements) exited expectedly but with unexpected exit code 3
10:48:45.711 [Init] [Installer] Enabling ComfyUI...
10:48:45.713 [Init] Initializing backend #0 - ComfyUI Self-Starting...
10:48:45.717 [Info] ComfyUI backend 0 shutting down...
10:48:45.717 [Init] [Installer] Installed!
10:48:45.958 [Info] Creating new admin session 'local' for ::1
10:48:48.332 [Info] Saving backends...
10:48:48.472 [Warning] [ComfyUI (Install rembg)/STDERR] ERROR: Could not find an activated virtualenv (required).
10:48:48.495 [Info] Self-Start ComfyUI (Install rembg) exited expectedly but with unexpected exit code 3
10:48:48.956 [Warning] [ComfyUI (Install onnxruntime)/STDERR] ERROR: Could not find an activated virtualenv (required).
10:48:48.980 [Info] Self-Start ComfyUI (Install onnxruntime) exited expectedly but with unexpected exit code 3
10:48:49.419 [Warning] [ComfyUI (Install matplotlib)/STDERR] ERROR: Could not find an activated virtualenv (required).
10:48:49.442 [Info] Self-Start ComfyUI (Install matplotlib) exited expectedly but with unexpected exit code 3
10:48:49.888 [Warning] [ComfyUI (Install opencv-python-headless)/STDERR] ERROR: Could not find an activated virtualenv (required).
10:48:49.912 [Info] Self-Start ComfyUI (Install opencv-python-headless) exited expectedly but with unexpected exit code 3
10:48:50.360 [Warning] [ComfyUI (Install imageio-ffmpeg)/STDERR] ERROR: Could not find an activated virtualenv (required).
10:48:50.383 [Info] Self-Start ComfyUI (Install imageio-ffmpeg) exited expectedly but with unexpected exit code 3
10:48:50.827 [Warning] [ComfyUI (Install dill)/STDERR] ERROR: Could not find an activated virtualenv (required).
10:48:50.850 [Info] Self-Start ComfyUI (Install dill) exited expectedly but with unexpected exit code 3
10:48:51.288 [Warning] [ComfyUI (Install ultralytics==8.3.69)/STDERR] ERROR: Could not find an activated virtualenv (required).
10:48:51.310 [Info] Self-Start ComfyUI (Install ultralytics==8.3.69) exited expectedly but with unexpected exit code 3

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    User SupportA user needs help with something, probably not a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions