ltdrdata / ComfyUI-Manager

ComfyUI-Manager is an extension designed to enhance the usability of ComfyUI. It offers management functions to install, remove, disable, and enable various custom nodes of ComfyUI. Furthermore, this extension provides a hub feature and convenience functions to access a wide range of information within ComfyUI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to execute startup-script - returned non-zero exit status 2.

fogostudio opened this issue · comments

After getting the following error I've tried with a fresh installation of ComfyUI, no custom nodes, then used install-manager-for-portable-version.bat to install ComfyUI-Manager and I'm still getting the same error:

F:\ComfyUI_windows_portable>.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build
[START] Security scan
ERROR: Exception:
Traceback (most recent call last):
  File "F:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pip\_internal\cli\base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
             ^^^^^^^^^^^^^^^
  File "F:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pip\_internal\commands\freeze.py", line 98, in run
    for line in freeze(
  File "F:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pip\_internal\operations\freeze.py", line 43, in freeze
    req = FrozenRequirement.from_dist(dist)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pip\_internal\operations\freeze.py", line 238, in from_dist
    req, comments = _get_editable_info(dist)
                    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pip\_internal\operations\freeze.py", line 165, in _get_editable_info
    vcs_backend = vcs.get_backend_for_dir(location)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pip\_internal\vcs\versioncontrol.py", line 238, in get_backend_for_dir
    repo_path = vcs_backend.get_repository_root(location)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pip\_internal\vcs\git.py", line 501, in get_repository_root
    r = cls.run_command(
        ^^^^^^^^^^^^^^^^
  File "F:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pip\_internal\vcs\versioncontrol.py", line 650, in run_command
    return call_subprocess(
           ^^^^^^^^^^^^^^^^
  File "F:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pip\_internal\utils\subprocess.py", line 141, in call_subprocess
    proc = subprocess.Popen(
           ^^^^^^^^^^^^^^^^^
  File "subprocess.py", line 1026, in __init__
  File "subprocess.py", line 1538, in _execute_child
NotADirectoryError: [WinError 267] The directory name is invalid
Failed to execute startup-script: F:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager\prestartup_script.py / Command '['F:\\ComfyUI_windows_portable\\python_embeded\\python.exe', '-m', 'pip', 'freeze']' returned non-zero exit status 2.

Prestartup times for custom nodes:
   1.5 seconds (PRESTARTUP FAILED): F:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager

Any ideas ? Thank!

Execute this
.\python_embeded\python.exe -m pip freeze

What is displayed?

Execute this .\python_embeded\python.exe -m pip freeze

What is displayed?

Here's the output:

F:\ComfyUI_windows_portable\python_embeded>python.exe -m pip freeze
ERROR: Exception:
Traceback (most recent call last):
  File "F:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pip\_internal\cli\base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
             ^^^^^^^^^^^^^^^
  File "F:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pip\_internal\commands\freeze.py", line 98, in run
    for line in freeze(
  File "F:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pip\_internal\operations\freeze.py", line 43, in freeze
    req = FrozenRequirement.from_dist(dist)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pip\_internal\operations\freeze.py", line 238, in from_dist
    req, comments = _get_editable_info(dist)
                    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pip\_internal\operations\freeze.py", line 165, in _get_editable_info
    vcs_backend = vcs.get_backend_for_dir(location)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pip\_internal\vcs\versioncontrol.py", line 238, in get_backend_for_dir
    repo_path = vcs_backend.get_repository_root(location)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pip\_internal\vcs\git.py", line 501, in get_repository_root
    r = cls.run_command(
        ^^^^^^^^^^^^^^^^
  File "F:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pip\_internal\vcs\versioncontrol.py", line 650, in run_command
    return call_subprocess(
           ^^^^^^^^^^^^^^^^
  File "F:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pip\_internal\utils\subprocess.py", line 141, in call_subprocess
    proc = subprocess.Popen(
           ^^^^^^^^^^^^^^^^^
  File "subprocess.py", line 1026, in __init__
  File "subprocess.py", line 1538, in _execute_child
NotADirectoryError: [WinError 267] The directory name is invalid

Download portable version again and extract it to C:\ComfyUI_windows_portable2.
Similarly, run .\python_embeded\python.exe -m pip freeze.

Did that, fresh extract, new harddrive, here's the output :

D:\ComfyUI_windows_portable2\python_embeded>python.exe -m pip freeze
ERROR: Exception:
Traceback (most recent call last):
  File "D:\ComfyUI_windows_portable2\python_embeded\Lib\site-packages\pip\_internal\cli\base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
             ^^^^^^^^^^^^^^^
  File "D:\ComfyUI_windows_portable2\python_embeded\Lib\site-packages\pip\_internal\commands\freeze.py", line 98, in run
    for line in freeze(
  File "D:\ComfyUI_windows_portable2\python_embeded\Lib\site-packages\pip\_internal\operations\freeze.py", line 43, in freeze
    req = FrozenRequirement.from_dist(dist)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ComfyUI_windows_portable2\python_embeded\Lib\site-packages\pip\_internal\operations\freeze.py", line 238, in from_dist
    req, comments = _get_editable_info(dist)
                    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ComfyUI_windows_portable2\python_embeded\Lib\site-packages\pip\_internal\operations\freeze.py", line 165, in _get_editable_info
    vcs_backend = vcs.get_backend_for_dir(location)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ComfyUI_windows_portable2\python_embeded\Lib\site-packages\pip\_internal\vcs\versioncontrol.py", line 238, in get_backend_for_dir
    repo_path = vcs_backend.get_repository_root(location)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ComfyUI_windows_portable2\python_embeded\Lib\site-packages\pip\_internal\vcs\git.py", line 501, in get_repository_root
    r = cls.run_command(
        ^^^^^^^^^^^^^^^^
  File "D:\ComfyUI_windows_portable2\python_embeded\Lib\site-packages\pip\_internal\vcs\versioncontrol.py", line 650, in run_command
    return call_subprocess(
           ^^^^^^^^^^^^^^^^
  File "D:\ComfyUI_windows_portable2\python_embeded\Lib\site-packages\pip\_internal\utils\subprocess.py", line 141, in call_subprocess
    proc = subprocess.Popen(
           ^^^^^^^^^^^^^^^^^
  File "subprocess.py", line 1026, in __init__
  File "subprocess.py", line 1538, in _execute_child
NotADirectoryError: [WinError 267] The directory name is invalid

SOLVED IT!

It was a conflict with the 'site-package' path of another python installation.

Managed to solve it adding the following to run_nvidia_gpu.bat :

@echo off
set PYTHONNOUSERSITE=1
set PYTHONPATH=F:\ComfyUI_windows_portable\python_embeded\Lib\site-packages
set PATH=F:\ComfyUI_windows_portable\python_embeded\Scripts;%PATH%
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build