[GH-ISSUE #23] No module named git #15

Closed
opened 2026-10-27 21:11:51 +00:00 by bsakaguchi · 6 comments
Owner

Originally created by @Renaldas111 on GitHub (Jul 10, 2023).
Original GitHub issue: https://github.com/Comfy-Org/ComfyUI-Manager/issues/23

How can it be, or it is some kind of another git (it is extremely frustrating to receive an error about missing git immediately after you just gitcloned a repo ...)? I git cloned the comfy manager into the folder as written, but after this I receive this error. I dont understand the structure of ComfyUI, in A1111 there was a venv with a possibility to activate it and see what packages are installed and which versions, ComfyUI in my amateur knowledge does not have easily visible venv which I can activate to install packages. Running pip install git gives me:

Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement git (from versions: none)
ERROR: No matching distribution found for git


Requirement already satisfied: GitPython in c:\users\rkana\appdata\roaming\python\python310\site-packages (from -r C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Manager\requirements.txt (line 1)) (3.1.31)
Requirement already satisfied: gitdb<5,>=4.0.1 in c:\users\rkana\appdata\roaming\python\python310\site-packages (from GitPython->-r C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Manager\requirements.txt (line 1)) (4.0.10)
Requirement already satisfied: smmap<6,>=3.0.1 in c:\users\rkana\appdata\roaming\python\python310\site-packages (from gitdb<5,>=4.0.1->GitPython->-r C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Manager\requirements.txt (line 1)) (5.0.0)
Traceback (most recent call last):
File "C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Manager_init_.py", line 7, in
import git
ModuleNotFoundError: No module named 'git'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\ComfyUI\ComfyUI\nodes.py", line 1509, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Manager_init
.py", line 12, in
import git
ModuleNotFoundError: No module named 'git'

Cannot import C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Manager module for custom nodes: No module named 'git'

Import times for custom nodes:
1.3 seconds (IMPORT FAILED): C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Manager

Originally created by @Renaldas111 on GitHub (Jul 10, 2023). Original GitHub issue: https://github.com/Comfy-Org/ComfyUI-Manager/issues/23 How can it be, or it is some kind of another git (it is extremely frustrating to receive an error about missing git immediately after you just gitcloned a repo ...)? I git cloned the comfy manager into the folder as written, but after this I receive this error. I dont understand the structure of ComfyUI, in A1111 there was a venv with a possibility to activate it and see what packages are installed and which versions, ComfyUI in my amateur knowledge does not have easily visible venv which I can activate to install packages. Running pip install git gives me: Defaulting to user installation because normal site-packages is not writeable ERROR: Could not find a version that satisfies the requirement git (from versions: none) ERROR: No matching distribution found for git ----------------------------------------------------------------------------------------------------------------------------- Requirement already satisfied: GitPython in c:\users\rkana\appdata\roaming\python\python310\site-packages (from -r C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Manager\requirements.txt (line 1)) (3.1.31) Requirement already satisfied: gitdb<5,>=4.0.1 in c:\users\rkana\appdata\roaming\python\python310\site-packages (from GitPython->-r C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Manager\requirements.txt (line 1)) (4.0.10) Requirement already satisfied: smmap<6,>=3.0.1 in c:\users\rkana\appdata\roaming\python\python310\site-packages (from gitdb<5,>=4.0.1->GitPython->-r C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Manager\requirements.txt (line 1)) (5.0.0) Traceback (most recent call last): File "C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Manager\__init__.py", line 7, in <module> import git ModuleNotFoundError: No module named 'git' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\ComfyUI\ComfyUI\nodes.py", line 1509, in load_custom_node module_spec.loader.exec_module(module) File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Manager\__init__.py", line 12, in <module> import git ModuleNotFoundError: No module named 'git' Cannot import C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Manager module for custom nodes: No module named 'git' Import times for custom nodes: 1.3 seconds (IMPORT FAILED): C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Manager
Author
Owner

@ltdrdata commented on GitHub (Jul 10, 2023):

It's seems python environment is broken somehow.

I am using venv+windows, too.

If you are using venv. Then activate venv and try execute this.

python -m pip list
python -c "import git"

And if still occurs same error but there is already exist gitpython in the list then remove the gitpython package and reinstall.

And then test again.

<!-- gh-comment-id:1629885629 --> @ltdrdata commented on GitHub (Jul 10, 2023): It's seems python environment is broken somehow. I am using venv+windows, too. If you are using venv. Then activate venv and try execute this. python -m pip list python -c "import git" And if still occurs same error but there is already exist gitpython in the list then remove the gitpython package and reinstall. And then test again.
Author
Owner

@xintoc commented on GitHub (Jul 11, 2023):

I get the same error.
then
" from gitdb.exc import BadName # NOQA @UnusedWildImport skipcq: PYL-W0401, PYL-W0614 "
tried to follow these instructions and now I get No module named 'gitdb'.

<!-- gh-comment-id:1631191488 --> @xintoc commented on GitHub (Jul 11, 2023): I get the same error. then " from gitdb.exc import BadName # NOQA @UnusedWildImport skipcq: PYL-W0401, PYL-W0614 " tried to follow these instructions and now I get No module named 'gitdb'.
Author
Owner

@xintoc commented on GitHub (Jul 12, 2023):

Found a solution from reddit:
"the dependencies probably installed to your appdata/local python folder instead of the one in X:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\python_embeded\Lib\site-packages , i had this issue and solved it by copying the missing modules in here."

copied 'gitpython' and 'smmap' and 'gitdb' to 'site-packages'

<!-- gh-comment-id:1632606238 --> @xintoc commented on GitHub (Jul 12, 2023): Found a solution from reddit: "the dependencies probably installed to your appdata/local python folder instead of the one in X:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\python_embeded\Lib\site-packages , i had this issue and solved it by copying the missing modules in here." copied 'gitpython' and 'smmap' and 'gitdb' to 'site-packages'
Author
Owner

@xintoc commented on GitHub (Jul 12, 2023):

or pretty much install the requirements.txt to the 'ComfyUI_windows_portable\python_embeded\Lib\site-packages' folder while in '../../../ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager'

<!-- gh-comment-id:1632898601 --> @xintoc commented on GitHub (Jul 12, 2023): or pretty much install the requirements.txt to the 'ComfyUI_windows_portable\python_embeded\Lib\site-packages' folder while in '../../../ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager'
Author
Owner

@Renaldas111 commented on GitHub (Jul 12, 2023):

I resolved the issue by installing the comfyUI by git cloning it, it looks I used the version, where you need to extract from archive. It is wokring with git cloned version, but not working with a version, where you need to extract from an archive.

<!-- gh-comment-id:1633022791 --> @Renaldas111 commented on GitHub (Jul 12, 2023): I resolved the issue by installing the comfyUI by git cloning it, it looks I used the version, where you need to extract from archive. It is wokring with git cloned version, but not working with a version, where you need to extract from an archive.
Author
Owner

@Renaldas111 commented on GitHub (Jul 12, 2023):

<!-- gh-comment-id:1633023618 --> @Renaldas111 commented on GitHub (Jul 12, 2023): -
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/ComfyUI-Manager#15
No description provided.