[GH-ISSUE #36] Install script for ComfyUI portable not working : bad git executable #19

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

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

D:\ComfyUI_windows_portable>install-manager-for-portable-version.bat

D:\ComfyUI_windows_portable>.\python_embeded\python.exe -s -m pip install gitpython
Requirement already satisfied: gitpython in d:\comfyui_windows_portable\python_embeded\lib\site-packages (3.1.32)
Requirement already satisfied: gitdb<5,>=4.0.1 in d:\comfyui_windows_portable\python_embeded\lib\site-packages (from gitpython) (4.0.10)
Requirement already satisfied: smmap<6,>=3.0.1 in d:\comfyui_windows_portable\python_embeded\lib\site-packages (from gitdb<5,>=4.0.1->gitpython) (5.0.0)
DEPRECATION: torchsde 0.2.5 has a non-standard dependency specifier numpy>=1.19.*; python_version >= "3.7". pip 23.3 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of torchsde or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063

D:\ComfyUI_windows_portable>.\python_embeded\python.exe -c "import git; git.Repo.clone_from('https://github.com/ltdrdata/ComfyUI-Manager', './ComfyUI/custom_nodes/ComfyUI-Manager')"
Traceback (most recent call last):
File "D:\ComfyUI_windows_portable\python_embeded\lib\site-packages\git_init_.py", line 89, in
refresh()
File "D:\ComfyUI_windows_portable\python_embeded\lib\site-packages\git_init_.py", line 76, in refresh
if not Git.refresh(path=path):
File "D:\ComfyUI_windows_portable\python_embeded\lib\site-packages\git\cmd.py", line 392, in refresh
raise ImportError(err)
ImportError: Bad git executable.
The git executable must be specified in one of the following ways:
- be included in your $PATH
- be set via $GIT_PYTHON_GIT_EXECUTABLE
- explicitly set via git.refresh()

All git commands will error until this is rectified.

This initial warning can be silenced or aggravated in the future by setting the
$GIT_PYTHON_REFRESH environment variable. Use one of the following values:
- quiet|q|silence|s|none|n|0: for no warning or exception
- warn|w|warning|1: for a printed warning
- error|e|raise|r|2: for a raised exception

Example:
export GIT_PYTHON_REFRESH=quiet

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "", line 1, in
File "D:\ComfyUI_windows_portable\python_embeded\lib\site-packages\git_init_.py", line 91, in
raise ImportError("Failed to initialize: {0}".format(_exc)) from _exc
ImportError: Failed to initialize: Bad git executable.
The git executable must be specified in one of the following ways:
- be included in your $PATH
- be set via $GIT_PYTHON_GIT_EXECUTABLE
- explicitly set via git.refresh()

All git commands will error until this is rectified.

This initial warning can be silenced or aggravated in the future by setting the
$GIT_PYTHON_REFRESH environment variable. Use one of the following values:
- quiet|q|silence|s|none|n|0: for no warning or exception
- warn|w|warning|1: for a printed warning
- error|e|raise|r|2: for a raised exception

Example:
export GIT_PYTHON_REFRESH=quiet

Originally created by @ghost on GitHub (Jul 29, 2023). Original GitHub issue: https://github.com/Comfy-Org/ComfyUI-Manager/issues/36 D:\ComfyUI_windows_portable>install-manager-for-portable-version.bat D:\ComfyUI_windows_portable>.\python_embeded\python.exe -s -m pip install gitpython Requirement already satisfied: gitpython in d:\comfyui_windows_portable\python_embeded\lib\site-packages (3.1.32) Requirement already satisfied: gitdb<5,>=4.0.1 in d:\comfyui_windows_portable\python_embeded\lib\site-packages (from gitpython) (4.0.10) Requirement already satisfied: smmap<6,>=3.0.1 in d:\comfyui_windows_portable\python_embeded\lib\site-packages (from gitdb<5,>=4.0.1->gitpython) (5.0.0) DEPRECATION: torchsde 0.2.5 has a non-standard dependency specifier numpy>=1.19.*; python_version >= "3.7". pip 23.3 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of torchsde or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063 D:\ComfyUI_windows_portable>.\python_embeded\python.exe -c "import git; git.Repo.clone_from('https://github.com/ltdrdata/ComfyUI-Manager', './ComfyUI/custom_nodes/ComfyUI-Manager')" Traceback (most recent call last): File "D:\ComfyUI_windows_portable\python_embeded\lib\site-packages\git\__init__.py", line 89, in <module> refresh() File "D:\ComfyUI_windows_portable\python_embeded\lib\site-packages\git\__init__.py", line 76, in refresh if not Git.refresh(path=path): File "D:\ComfyUI_windows_portable\python_embeded\lib\site-packages\git\cmd.py", line 392, in refresh raise ImportError(err) ImportError: Bad git executable. The git executable must be specified in one of the following ways: - be included in your $PATH - be set via $GIT_PYTHON_GIT_EXECUTABLE - explicitly set via git.refresh() All git commands will error until this is rectified. This initial warning can be silenced or aggravated in the future by setting the $GIT_PYTHON_REFRESH environment variable. Use one of the following values: - quiet|q|silence|s|none|n|0: for no warning or exception - warn|w|warning|1: for a printed warning - error|e|raise|r|2: for a raised exception Example: export GIT_PYTHON_REFRESH=quiet The above exception was the direct cause of the following exception: Traceback (most recent call last): File "<string>", line 1, in <module> File "D:\ComfyUI_windows_portable\python_embeded\lib\site-packages\git\__init__.py", line 91, in <module> raise ImportError("Failed to initialize: {0}".format(_exc)) from _exc ImportError: Failed to initialize: Bad git executable. The git executable must be specified in one of the following ways: - be included in your $PATH - be set via $GIT_PYTHON_GIT_EXECUTABLE - explicitly set via git.refresh() All git commands will error until this is rectified. This initial warning can be silenced or aggravated in the future by setting the $GIT_PYTHON_REFRESH environment variable. Use one of the following values: - quiet|q|silence|s|none|n|0: for no warning or exception - warn|w|warning|1: for a printed warning - error|e|raise|r|2: for a raised exception Example: export GIT_PYTHON_REFRESH=quiet
Author
Owner

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

try update "git bash" program to latest version.

<!-- gh-comment-id:1656961104 --> @ltdrdata commented on GitHub (Jul 29, 2023): try update "git bash" program to latest version.
Author
Owner

@ghost commented on GitHub (Jul 30, 2023):

I have only ComfyUI portable, even running the update script doesn't solve the problem.
Can't find git.exe in the directory.
Maybe Manager can't be installed with ComfyUI portable alone or script must be updated to use pip only.

<!-- gh-comment-id:1657059635 --> @ghost commented on GitHub (Jul 30, 2023): I have only ComfyUI portable, even running the update script doesn't solve the problem. Can't find git.exe in the directory. Maybe Manager can't be installed with ComfyUI portable alone or script must be updated to use pip only.
Author
Owner

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

I have only ComfyUI portable, even running the update script doesn't solve the problem. Can't find git.exe in the directory. Maybe Manager can't be installed with ComfyUI portable alone or script must be updated to use pip only.

Retry after install this.

https://git-scm.com/download/win

I am not sure. But I hope it will solve this problem.

<!-- gh-comment-id:1657060117 --> @ltdrdata commented on GitHub (Jul 30, 2023): > I have only ComfyUI portable, even running the update script doesn't solve the problem. Can't find git.exe in the directory. Maybe Manager can't be installed with ComfyUI portable alone or script must be updated to use pip only. Retry after install this. https://git-scm.com/download/win I am not sure. But I hope it will solve this problem.
Author
Owner

@ghost commented on GitHub (Jul 30, 2023):

It doesn't change anything, I have tried portable git and normal install.

I found other people with same problem here, he doesn't put the .bat in main directory like me but the error is same.
https://www.reddit.com/r/comfyui/comments/15d2ngw/comfy_ui_manager_instalation/

<!-- gh-comment-id:1657181708 --> @ghost commented on GitHub (Jul 30, 2023): It doesn't change anything, I have tried portable git and normal install. I found other people with same problem here, he doesn't put the .bat in main directory like me but the error is same. https://www.reddit.com/r/comfyui/comments/15d2ngw/comfy_ui_manager_instalation/
Author
Owner

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

Try this solutions

https://github.com/gitpython-developers/GitPython/issues/816

<!-- gh-comment-id:1657219631 --> @ltdrdata commented on GitHub (Jul 30, 2023): Try this solutions https://github.com/gitpython-developers/GitPython/issues/816
Author
Owner

@ghost commented on GitHub (Jul 30, 2023):

I have modified my path in Windows to add D:\Git\bin the git installer forgot to do that.

Now it works thanks.

<!-- gh-comment-id:1657230215 --> @ghost commented on GitHub (Jul 30, 2023): I have modified my path in Windows to add D:\Git\bin the git installer forgot to do that. Now it works thanks.
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#19
No description provided.