Fix issue with > in pip cmd causing file creation (#2952)

pull/2953/head
Uminosachi 2024-06-10 02:01:39 +09:00 committed by GitHub
parent bb3c2a9bf7
commit 8bbbd0e55e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -38,7 +38,7 @@ def install_requirements(req_file):
installed_version = get_installed_version(package_name)
if installed_version != package_version:
launch.run_pip(
f"install -U {package}",
f'install -U "{package}"',
f"sd-webui-controlnet requirement: changing {package_name} version from {installed_version} to {package_version}",
)
elif ">=" in package:
@ -48,7 +48,7 @@ def install_requirements(req_file):
installed_version
) < comparable_version(package_version):
launch.run_pip(
f"install -U {package}",
f'install -U "{package}"',
f"sd-webui-controlnet requirement: changing {package_name} version from {installed_version} to {package_version}",
)
elif "<=" in package:
@ -58,12 +58,12 @@ def install_requirements(req_file):
installed_version
) > comparable_version(package_version):
launch.run_pip(
f"install {package_name}=={package_version}",
f'install "{package_name}=={package_version}"',
f"sd-webui-controlnet requirement: changing {package_name} version from {installed_version} to {package_version}",
)
elif not launch.is_installed(extract_base_package(package)):
launch.run_pip(
f"install {package}",
f'install "{package}"',
f"sd-webui-controlnet requirement: {package}",
)
except Exception as e: