Skip to content

[Bug] ComfyUI Shared v2 Launcher cannot install Python dependencies (PEP 668 externally-managed-environment) #2195

@VladMVLX

Description

@VladMVLX

Please Provide the basic information of the app

App name
ComfyUI Shared v2

App URL in Olares Market
https://market.olares.com/app/comfyuisharev2

Describe the bug

On a fresh Olares installation, installing Python dependencies from the ComfyUI Launcher UI (Environment → Install package or Dependency analysis → Install) fails with:

error: externally-managed-environment

This happens because the backend runs pip against the system Python (/usr/bin/python3) which has the PEP 668 EXTERNALLY-MANAGED marker, but the install commands do not include --break-system-packages.

As a result, the built-in dependency installation feature does not work out of the box.

To Reproduce
OS Version: Fresh Olares install (latest version)
Browser: Chrome

Steps:

Install ComfyUI Shared v2 from Olares Market
Open ComfyUI Launcher
Go to Environment → Dependency analysis
Click Install on any missing dependency (e.g. deepdiff)
Observe failure
Expected behavior

Dependencies should install successfully via the UI.

Actual behavior

Installation fails with:

error: externally-managed-environment

Root cause (important)

Inside the container:

Python executable: /usr/bin/python3
File exists: /usr/lib/python3.12/EXTERNALLY-MANAGED

So pip refuses system installs unless --break-system-packages is used.

Verified fix

Modify backend install commands:

File:
/app/server/dist/controllers/python/python.controller.js

Change:
['-m', 'pip', 'install', '--user', ...]

to:
['-m', 'pip', 'install', '--break-system-packages', '--user', ...]

File:
/app/server/dist/controllers/plugin/install.js

Change:
pip install --user -r requirements.txt

to:
python3 -m pip install --break-system-packages --user -r requirements.txt

Additional notes
The install scripts in the image already use --break-system-packages, but the backend API does not.
This creates inconsistent behavior:
initial install works
UI installs fail

Workaround

Manual install inside container works:

python3 -m pip install --break-system-packages

Impact
Breaks dependency installation on fresh install
Affects both:
Install New Package
Dependency analysis → Install
Likely affects all users who attempt to install missing dependencies
Additional context

This appears to be a mismatch between container design (system Python + PEP 668) and backend install implementation.

Important note:
All of this happens in fresh install on DGX Spark

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions