Browse Source

fix: try install 'distutils' when distutils package is missing

afaik, distutils is a basic package

https://github.com/ltdrdata/ComfyUI-Manager/issues/536
pull/537/head
Dr.Lt.Data 8 months ago
parent
commit
e75770cc4d
  1. 2
      __init__.py
  2. 8
      prestartup_script.py
  3. 3
      requirements.txt

2
__init__.py

@ -30,7 +30,7 @@ except:
print(f"[WARN] ComfyUI-Manager: Your ComfyUI version is outdated. Please update to the latest version.")
version = [2, 13]
version = [2, 13, 1]
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')
print(f"### Loading: ComfyUI-Manager ({version_str})")

8
prestartup_script.py

@ -7,9 +7,15 @@ import threading
import re
import locale
import platform
from distutils.version import StrictVersion
try:
from distutils.version import StrictVersion
except:
print(f"[ComfyUI-Manager] Missing `distutils`. Try install...")
subprocess.check_output([sys.executable, '-m', 'pip', 'install', 'distutils'])
from distutils.version import StrictVersion
glob_path = os.path.join(os.path.dirname(__file__), "glob")
sys.path.append(glob_path)

3
requirements.txt

@ -2,5 +2,4 @@ GitPython
PyGithub
matrix-client==0.4.0
transformers
huggingface-hub>0.20
distutils
huggingface-hub>0.20
Loading…
Cancel
Save