[GH-ISSUE #1596] [Bug]: Some package are not well installed by the manager #473

Closed
opened 2026-10-31 22:13:24 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @msnbcorp on GitHub (Feb 7, 2026).
Original GitHub issue: https://github.com/Comfy-Org/desktop/issues/1596

App Version

0.8.3

Expected Behavior

Installation should success

Actual Behavior

Hi, when you install some packages (custom nodes), not all, via the manager, some of them will give this error :

It keep saying :
ModuleNotFoundError: No module named 'comfy'

It is the case with several nodes, but for example it is the case with the famous RES4LYF package.

Some have reported this on the RES4LYF github :
https://github.com/ClownsharkBatwing/RES4LYF/issues/221

And the issue seems to be explained and fixed with this comment :

Fix that worked for me: Add ComfyUI’s root folder to the venv PYTHONPATH via a .pth file.
ComfyUI-Manager sometimes runs helper scripts (e.g., git clone/install) in the virtualenv without the ComfyUI root on sys.path, so imports like from > comfy... fail with ModuleNotFoundError: No module named 'comfy'. Creating a .pth file in site-packages that contains the ComfyUI root path makes > Python automatically include it on startup, so the comfy module resolves.

Command used:

echo C:\Users<YOURUSERNAMEHERE>\AppData\Local\Programs\ComfyUI\resources\ComfyUI > "C:\Users\YOURUSERNAMEHERE\ComfyUI
Installation Folder.venv\Lib\site-packages\comfyui_root.pth"

I have tested that this indeed fix the bug and recommend to push this idea if this is OK.

Steps to Reproduce

Try to install RES4LYF with the manager

Debug Logs

ModuleNotFoundError: No module named 'comfy'

Browser Logs

No response

Settings JSON

No response

Other

No response

┆Issue is synchronized with this Notion page by Unito

Originally created by @msnbcorp on GitHub (Feb 7, 2026). Original GitHub issue: https://github.com/Comfy-Org/desktop/issues/1596 ### App Version 0.8.3 ### Expected Behavior Installation should success ### Actual Behavior Hi, when you install some packages (custom nodes), not all, via the manager, some of them will give this error : It keep saying : ModuleNotFoundError: No module named 'comfy' It is the case with several nodes, but for example it is the case with the famous RES4LYF package. Some have reported this on the RES4LYF github : https://github.com/ClownsharkBatwing/RES4LYF/issues/221 And the issue seems to be explained and fixed with this comment : > Fix that worked for me: Add ComfyUI’s root folder to the venv PYTHONPATH via a .pth file. > ComfyUI-Manager sometimes runs helper scripts (e.g., git clone/install) in the virtualenv without the ComfyUI root on sys.path, so imports like from > comfy... fail with ModuleNotFoundError: No module named 'comfy'. Creating a .pth file in site-packages that contains the ComfyUI root path makes > Python automatically include it on startup, so the comfy module resolves. > >Command used: > > echo C:\Users\<YOURUSERNAMEHERE>\AppData\Local\Programs\ComfyUI\resources\ComfyUI > "C:\Users\YOURUSERNAMEHERE\ComfyUI > Installation Folder\.venv\Lib\site-packages\comfyui_root.pth" I have tested that this indeed fix the bug and recommend to push this idea if this is OK. ### Steps to Reproduce Try to install RES4LYF with the manager ### Debug Logs ```powershell ModuleNotFoundError: No module named 'comfy' ``` ### Browser Logs _No response_ ### Settings JSON _No response_ ### Other _No response_ ┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-1596-Bug-Some-package-are-not-well-installed-by-the-manager-3006d73d365081789d3bf88fcb0e2e4c) by [Unito](https://www.unito.io)
bsakaguchi 2026-10-31 22:13:24 +00:00
Author
Owner

@dosubot[bot] commented on GitHub (May 9, 2026):

Hi, @msnbcorp. I'm Dosu, and I'm helping the desktop team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported a "ModuleNotFoundError" for the 'comfy' module when installing certain packages like RES4LYF.
  • The error was due to the virtual environment missing the ComfyUI root in its PYTHONPATH.
  • You found that adding a .pth file in the venv's site-packages pointing to the ComfyUI root folder resolves the issue.
  • You suggested integrating this fix into the package manager to prevent similar import errors.
  • No further comments or updates have been made since your last input.

Next Steps:

  • Please let us know if this issue is still relevant with the latest version of the desktop app by commenting here.
  • If we don’t hear back within 7 days, this issue will be automatically closed.

Thanks for your understanding and contribution!

<!-- gh-comment-id:4412946787 --> @dosubot[bot] commented on GitHub (May 9, 2026): Hi, @msnbcorp. I'm [Dosu](https://dosu.dev), and I'm helping the desktop team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported a "ModuleNotFoundError" for the 'comfy' module when installing certain packages like RES4LYF. - The error was due to the virtual environment missing the ComfyUI root in its PYTHONPATH. - You found that adding a .pth file in the venv's site-packages pointing to the ComfyUI root folder resolves the issue. - You suggested integrating this fix into the package manager to prevent similar import errors. - No further comments or updates have been made since your last input. **Next Steps:** - Please let us know if this issue is still relevant with the latest version of the desktop app by commenting here. - If we don’t hear back within 7 days, this issue will be automatically closed. Thanks for your understanding and contribution!
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#473
No description provided.