ComfyUI-Manager: No module named 'git' (IMPORT FAILED fix)

Cannot import .../ComfyUI-Manager module for custom nodes: No module named 'git' means Manager's automatic dependency install failed. We reproduced it with ComfyUI v0.37.0 and Manager V3.42 and fixed it.

1. The error

We started ComfyUI v0.37.0 with ComfyUI-Manager V3.42 in custom_nodes and GitPython (the package that provides import git) uninstalled. Manager's prestartup script checks its own dependencies and tries to install missing ones by itself (in our toml test, with network access, it reinstalled the package and loaded fine). The error only appears when that automatic install fails. We made the package index unreachable to reproduce it:

## ComfyUI-Manager: installing dependencies.
Using Python 3.11.17 environment at: /path/to/venv
error: Request failed after 3 retries in 5.3s
  cause: Failed to fetch: http://127.0.0.1:9/simple/uv/
  cause: error sending request for url (http://127.0.0.1:9/simple/uv/)
  cause: client error (Connect)
  cause: tcp connect error
  cause: Connection refused (os error 111)
## [ERROR] ComfyUI-Manager: Attempting to reinstall dependencies using an alternative method.
error: pip's `--user` is unsupported (use a virtual environment instead)
## [ERROR] ComfyUI-Manager: Failed to install required packages in the correct Python environment. Please install requirements.txt manually in the appropriate environment. (You can seek help at https: …
## ComfyUI-Manager: installing dependencies done.

ComfyUI then kept starting, and Manager failed to import:

[WARNING] Traceback (most recent call last):
  File "/path/to/ComfyUI/nodes.py", line 2266, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/path/to/ComfyUI/custom_nodes/ComfyUI-Manager/__init__.py", line 12, in <module>
    import manager_server  # noqa: F401
    ^^^^^^^^^^^^^^^^^^^^^
  File "/path/to/ComfyUI/custom_nodes/ComfyUI-Manager/glob/manager_server.py", line 13, in <module>
    import git
ModuleNotFoundError: No module named 'git'

[WARNING] Cannot import /path/to/ComfyUI/custom_nodes/ComfyUI-Manager module for custom nodes: No module named 'git'
[INFO]    0.0 seconds (IMPORT FAILED): /path/to/ComfyUI/custom_nodes/ComfyUI-Manager

ComfyUI still exited 0 (other nodes loaded), so the only visible symptom is the missing Manager button. glob/manager_server.py line 13 does import git. The module comes from the GitPython package, which is the first line of Manager's own requirements.txt (not ComfyUI's). Install GitPython, not a package called git.

2. Fix: install Manager's requirements.txt with ComfyUI's Python

From the ComfyUI folder, using the Python that starts ComfyUI (your venv's python; in the Windows portable build, ..\python_embeded\python.exe run from inside the ComfyUI folder):

python -m pip install -r custom_nodes/ComfyUI-Manager/requirements.txt
Collecting GitPython (from -r custom_nodes/ComfyUI-Manager/requirements.txt (line 1))
  Downloading gitpython-3.2.1-py3-none-any.whl.metadata (13 kB)
Downloading gitpython-3.2.1-py3-none-any.whl (231 kB)
Installing collected packages: GitPython
Successfully installed GitPython-3.2.1

On the next start, Manager loaded with no IMPORT FAILED:

[INFO]    0.0 seconds: /path/to/ComfyUI/custom_nodes/ComfyUI-Manager

If the automatic install failed for you, fix the reason too (no network, a proxy, or a Python without pip), or Manager will hit the same wall for its other dependencies. The second message above (pip's --user is unsupported) came from Manager's fallback attempt and is harmless inside a venv.

If pip says GitPython is already installed and the error stays, you are installing into a different Python than the one running ComfyUI. See ComfyUI: No module named 'yaml' for how to find the right one.

Related: ComfyUI-Manager: No module named 'toml' · ComfyUI-Manager: Bad git executable · ComfyUI-Manager: No module named 'comfy' · ComfyUI-Manager cm-cli: No module named 'utils' · ComfyUI: No module named 'numpy'

Frequently asked questions

Which package provides import git?

GitPython. Run python -m pip install GitPython (or Manager's requirements.txt) with the Python that starts ComfyUI.

Is this the same as the Bad git executable error?

No. No module named 'git' means the GitPython library is missing; Bad git executable means GitPython is installed but cannot find the git program.

Written with AI assistance. Measured on 2026-10-24 on Linux, CPython 3.11.17, pip 26.2.2: ComfyUI v0.37.0 with ComfyUI-Manager V3.42 (commit 7e1af9c), GitPython uninstalled and the package index unreachable, then after pip install -r requirements.txt (GitPython 3.2.1). Output pasted unedited except shortened paths and long lines. PlainTables is our extension; ComfyUI, ComfyUI-Manager and GitPython are free.