mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-17 02:12:58 +08:00
fix: Fix for the issue of pip version not upgrading
https://github.com/ltdrdata/ComfyUI-Manager/issues/772
This commit is contained in:
parent
974d7a158c
commit
e4ba360f34
@ -429,7 +429,20 @@ def is_installed(name):
|
|||||||
print(f"[ComfyUI-Manager] skip black listed pip installation: '{name}'")
|
print(f"[ComfyUI-Manager] skip black listed pip installation: '{name}'")
|
||||||
return True
|
return True
|
||||||
|
|
||||||
return name.lower() in get_installed_packages()
|
pkg = get_installed_packages().get(name.lower())
|
||||||
|
if pkg is None:
|
||||||
|
return False # update if not installed
|
||||||
|
|
||||||
|
if match is None:
|
||||||
|
return True # don't update if version is not specified
|
||||||
|
|
||||||
|
if match.group(2) in ['>', '>=']:
|
||||||
|
if StrictVersion(pkg) < StrictVersion(match.group(3)):
|
||||||
|
return False
|
||||||
|
elif StrictVersion(pkg) > StrictVersion(match.group(3)):
|
||||||
|
print(f"[SKIP] Downgrading pip package isn't allowed: {name.lower()} (cur={pkg})")
|
||||||
|
|
||||||
|
return True # prevent downgrade
|
||||||
|
|
||||||
|
|
||||||
if os.path.exists(restore_snapshot_path):
|
if os.path.exists(restore_snapshot_path):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user