[GH-ISSUE #1722] [Bug]: global uv setting exclude-newer causes install failure #524

Open
opened 2026-10-31 22:14:04 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @tvanantwerp on GitHub (May 15, 2026).
Original GitHub issue: https://github.com/Comfy-Org/desktop/issues/1722

App Version

ComfyUI Desktop 0.9.1 (fresh install, never successfully launched)

Expected Behavior

On first-run setup on macOS arm64, the desktop installer should either (a) be insulated from the user's global uv configuration, or (b) fail with a clear, actionable error message — rather than ending up in an unsatisfiable resolver state because of a user-level uv.toml setting.

Actual Behavior

The desktop's bundled uv binary reads the user's global config at ~/.config/uv/uv.toml. If that file sets exclude-newer, the resolver can't find a satisfiable torch candidate on macOS arm64 and the install never completes.

Two suggested fixes for the desktop installer:

  1. Pass --no-config (or set UV_NO_CONFIG=1) on the install invocations so the desktop's Python bootstrap can't be derailed by
    user-level uv config. The desktop ships its own bundled uv precisely to control this environment; inheriting arbitrary user
    uv.toml defeats that.
  2. Failing that, the resolver error should be caught and surfaced with a clearer hint than the raw uv output (e.g. detect when no torch candidate matches the platform and call out exclude-newer or non-default index settings as a likely cause).

Secondary follow-on bug, regardless of root cause: after a failed install leaves a partial .venv, the next launch runs uv venv --python 3.12 --python-preference only-managed which prompts A virtual environment already exists at .venv. Do you want to replace it? — non-interactively answered "no" — and aborts:

error: Failed to create virtual environment
Caused by: A virtual environment already exists at: .venv
hint: Use the --clear flag or set UV_VENV_CLEAR=1 to replace the existing virtual environment

The installer should pass --clear (or UV_VENV_CLEAR=1) so a failed first attempt doesn't permanently wedge the install and require the user to manually find and delete the stale .venv.

Steps to Reproduce

  1. Set up a global uv config at ~/.config/uv/uv.toml containing something like:
    exclude-newer = "2026-04-28"
  2. Install ComfyUI Desktop 0.9.1 on macOS arm64.
  3. Launch the app and let first-run setup proceed with default options.
  4. Observe uv pip install / uv sync fail with "No solution found when resolving dependencies" and the macOS-arm64-wheel hint.
  5. Quit and relaunch — now uv venv fails because the partial .venv already exists.

Debug Logs

The resolver-error tail (full trace available in ~/Library/Logs/ComfyUI/main.log):

    x No solution found when resolving dependencies:
    `-> Because there are no versions of filelock and all of:
            torch<=2.12.0.dev20260317
            ...
            torch==2.13.0.dev20260427
        depend on filelock, we can conclude that all of:
            ...
         cannot be used.
        And because only the following versions of torch are available:
            torch==2.12.0.dev20260317
            torch==2.12.0.dev20260317+cpu
            ...
            torch==2.13.0.dev20260427+cpu
        ...
        And because all of:
            torch==2.12.0.dev20260317+cpu
            ...
            torch>=2.13.0.dev20260427+cpu
         have no wheels with a matching platform tag (e.g., `macosx_15_0_arm64`)
        and you require torch, we can conclude that your requirements are
        unsatisfiable.

        hint: Wheels are available for `torch` (v2.13.0.dev20260427+cpu) on the
        following platforms: `manylinux_2_28_aarch64`, `manylinux_2_28_x86_64`,
        `win_amd64`, `win_arm64`

  Preceding the resolver error were several hundred warning: Pillow-X.Y.Z-*.whl is missing an upload date, but user provided:
  2026-04-28T00:00:00Z lines — the 2026-04-28 value is the exclude-newer cutoff from my user uv.toml, which is what tipped me off
  that the global config was leaking in.

  Second-launch failure:

  /Applications/ComfyUI.app/Contents/Resources/uv/macos/uv "venv" "--python" "3.12" "--python-preference" "only-managed"
  Using CPython 3.12.11
  Creating virtual environment at: .venv
  ✔ A virtual environment already exists at `.venv`. Do you want to replace it? · no
  error: Failed to create virtual environment
    Caused by: A virtual environment already exists at: .venv
  hint: Use the `--clear` flag or set `UV_VENV_CLEAR=1` to replace the existing virtual environment

Browser Logs

n/a

Settings JSON

n/a

Other

  • Hardware: 2023 Mac Mini, Apple M2 Pro, 32 GB RAM
  • OS: macOS 15.7.3
  • App: ComfyUI Desktop 0.9.1 (fresh install)
  • Python: bundled CPython 3.12.11 via the app's bundled uv at /Applications/ComfyUI.app/Contents/Resources/uv/macos/uv

┆Issue is synchronized with this Notion page by Unito

Originally created by @tvanantwerp on GitHub (May 15, 2026). Original GitHub issue: https://github.com/Comfy-Org/desktop/issues/1722 ### App Version ComfyUI Desktop 0.9.1 (fresh install, never successfully launched) ### Expected Behavior On first-run setup on macOS arm64, the desktop installer should either (a) be insulated from the user's global uv configuration, or (b) fail with a clear, actionable error message — rather than ending up in an unsatisfiable resolver state because of a user-level uv.toml setting. ### Actual Behavior The desktop's bundled uv binary reads the user's global config at `~/.config/uv/uv.toml`. If that file sets `exclude-newer`, the resolver can't find a satisfiable torch candidate on macOS arm64 and the install never completes. Two suggested fixes for the desktop installer: 1. Pass `--no-config` (or set `UV_NO_CONFIG=1`) on the install invocations so the desktop's Python bootstrap can't be derailed by user-level uv config. The desktop ships its own bundled uv precisely to control this environment; inheriting arbitrary user uv.toml defeats that. 1. Failing that, the resolver error should be caught and surfaced with a clearer hint than the raw uv output (e.g. detect when no torch candidate matches the platform and call out exclude-newer or non-default index settings as a likely cause). Secondary follow-on bug, regardless of root cause: after a failed install leaves a partial `.venv`, the next launch runs `uv venv --python 3.12 --python-preference only-managed` which prompts `A virtual environment already exists at .venv. Do you want to replace it?` — non-interactively answered "no" — and aborts: ``` error: Failed to create virtual environment Caused by: A virtual environment already exists at: .venv hint: Use the --clear flag or set UV_VENV_CLEAR=1 to replace the existing virtual environment ``` The installer should pass `--clear` (or `UV_VENV_CLEAR=1`) so a failed first attempt doesn't permanently wedge the install and require the user to manually find and delete the stale `.venv`. ### Steps to Reproduce 1. Set up a global uv config at `~/.config/uv/uv.toml` containing something like: `exclude-newer = "2026-04-28"` 2. Install ComfyUI Desktop 0.9.1 on macOS arm64. 3. Launch the app and let first-run setup proceed with default options. 4. Observe `uv pip install` / `uv sync` fail with "No solution found when resolving dependencies" and the macOS-arm64-wheel hint. 5. Quit and relaunch — now `uv venv` fails because the partial `.venv` already exists. ### Debug Logs ```powershell The resolver-error tail (full trace available in ~/Library/Logs/ComfyUI/main.log): x No solution found when resolving dependencies: `-> Because there are no versions of filelock and all of: torch<=2.12.0.dev20260317 ... torch==2.13.0.dev20260427 depend on filelock, we can conclude that all of: ... cannot be used. And because only the following versions of torch are available: torch==2.12.0.dev20260317 torch==2.12.0.dev20260317+cpu ... torch==2.13.0.dev20260427+cpu ... And because all of: torch==2.12.0.dev20260317+cpu ... torch>=2.13.0.dev20260427+cpu have no wheels with a matching platform tag (e.g., `macosx_15_0_arm64`) and you require torch, we can conclude that your requirements are unsatisfiable. hint: Wheels are available for `torch` (v2.13.0.dev20260427+cpu) on the following platforms: `manylinux_2_28_aarch64`, `manylinux_2_28_x86_64`, `win_amd64`, `win_arm64` Preceding the resolver error were several hundred warning: Pillow-X.Y.Z-*.whl is missing an upload date, but user provided: 2026-04-28T00:00:00Z lines — the 2026-04-28 value is the exclude-newer cutoff from my user uv.toml, which is what tipped me off that the global config was leaking in. Second-launch failure: /Applications/ComfyUI.app/Contents/Resources/uv/macos/uv "venv" "--python" "3.12" "--python-preference" "only-managed" Using CPython 3.12.11 Creating virtual environment at: .venv ✔ A virtual environment already exists at `.venv`. Do you want to replace it? · no error: Failed to create virtual environment Caused by: A virtual environment already exists at: .venv hint: Use the `--clear` flag or set `UV_VENV_CLEAR=1` to replace the existing virtual environment ``` ### Browser Logs n/a ### Settings JSON n/a ### Other - Hardware: 2023 Mac Mini, Apple M2 Pro, 32 GB RAM - OS: macOS 15.7.3 - App: ComfyUI Desktop 0.9.1 (fresh install) - Python: bundled CPython 3.12.11 via the app's bundled `uv` at `/Applications/ComfyUI.app/Contents/Resources/uv/macos/uv` ┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-1722-Bug-global-uv-setting-exclude-newer-causes-install-failure-3616d73d36508107bf22e5d72c0af916) by [Unito](https://www.unito.io)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/desktop#524
No description provided.