mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-17 02:12:58 +08:00
fix: try install 'distutils' when distutils package is missing
afaik, distutils is a basic package https://github.com/ltdrdata/ComfyUI-Manager/issues/536
This commit is contained in:
parent
ff0cc58076
commit
e75770cc4d
@ -30,7 +30,7 @@ except:
|
|||||||
print(f"[WARN] ComfyUI-Manager: Your ComfyUI version is outdated. Please update to the latest version.")
|
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 '')
|
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')
|
||||||
print(f"### Loading: ComfyUI-Manager ({version_str})")
|
print(f"### Loading: ComfyUI-Manager ({version_str})")
|
||||||
|
|
||||||
|
|||||||
@ -7,9 +7,15 @@ import threading
|
|||||||
import re
|
import re
|
||||||
import locale
|
import locale
|
||||||
import platform
|
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")
|
glob_path = os.path.join(os.path.dirname(__file__), "glob")
|
||||||
sys.path.append(glob_path)
|
sys.path.append(glob_path)
|
||||||
|
|
||||||
|
|||||||
@ -3,4 +3,3 @@ PyGithub
|
|||||||
matrix-client==0.4.0
|
matrix-client==0.4.0
|
||||||
transformers
|
transformers
|
||||||
huggingface-hub>0.20
|
huggingface-hub>0.20
|
||||||
distutils
|
|
||||||
Loading…
Reference in New Issue
Block a user