mirror of
https://github.com/Comfy-Org/desktop.git
synced 2026-11-04 23:47:43 +00:00
[GH-ISSUE #1574] First install fails when .venv exists but uv-managed Python is missing (uv inspect error 103) #463
Labels
No labels
area: desktop-app
Bounty
bug
bug-cop:answered
bug-cop:response-received
component: installer
component: preload
custom node
dependencies
Design
documentation
duplicate
enhancement
expected
frontend
good first issue
installation
Low-Priority
performance
Planned
platform: cross-platform
platform: windows
Potential Bug
Potential Bug
pull-request
question
refactor
Release
stale
User Support
V1
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/desktop#463
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @benceruleanlu on GitHub (Jan 31, 2026).
Original GitHub issue: https://github.com/Comfy-Org/desktop/issues/1574
Summary
First-time install can fail when a partially created
.venvexists but uv’s managed Python is missing.hasRequirements()callsuv pip install --dry-runwhich fails with “Failed to inspect Python interpreter … exit code: 103”, and the install aborts.Logs (Jan 31, 2026)
Then:
Suspected cause
If the first install is interrupted or the uv-managed Python download/extract fails,
.venvexists butpython.exepoints to a missing managed Python.VirtualEnvironment.createEnvironment()treats any existing.venvas usable and callshasRequirements(), which fails in uv’s inspection phase.Proposed fix
VirtualEnvironment.createEnvironment(), before callinghasRequirements()on an existing.venv, verify the python interpreter is executable; if not, remove the venv and recreate.hasRequirements()when python is OK to avoid noisy uv errors.Repro (likely)
%APPDATA%\uv\pythonafter.venvcreated).Expected
Installer should recover by recreating the venv when the python interpreter is missing or invalid.
┆Issue is synchronized with this Notion page by Unito
@dosubot[bot] commented on GitHub (Jan 31, 2026):
You’ve correctly identified the root cause: if the
.venvdirectory exists but the uv-managed Python interpreter is missing (often due to an interrupted install), the installer assumes the environment is valid and immediately callshasRequirements(). This triggers auv pip install --dry-run, which fails with an error like “Failed to inspect Python interpreter … exit code: 103” because the Python executable is missing. The install then aborts without attempting recovery.Currently, the code does not explicitly check if the Python interpreter is present or executable before running uv commands. Instead, it relies on the presence of the
.venvdirectory and only attempts recovery after requirements or import verification fails, often requiring user intervention or a manual reset of the environment. This behavior is confirmed in both the implementation and recent merged PRs (#1299, #1313, #1316), which improved recovery from partial or corrupt venvs but do not yet add a pre-check for interpreter executability before callinghasRequirements()(source).Your proposed fix—to verify the Python interpreter is executable before calling
hasRequirements()and to remove/recreate the venv if not—would make the installer more robust and prevent this class of install failures. This check is not currently implemented, so adding it would address the noisy uv errors and improve the recovery experience.For now, the main workaround remains to manually delete the
.venvdirectory and restart the app, which forces a clean environment setup. Automatic detection and recreation of a missing or invalid Python interpreter is a logical next step for further improvement.References for further reading and tracking:
To reply, just mention @dosu.
Share context across your team and agents. Try Dosu.