Skip to content

Commit

Permalink
Fix issue with > in pip cmd causing file creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Uminosachi committed Jun 9, 2024
1 parent bb3c2a9 commit 4102788
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 4102788

Please sign in to comment.