feat: pip fixer for torch, opencv

fixed: Preventing the browser from reopening automatically after a restart on Windows.
This commit is contained in:
Dr.Lt.Data
2024-11-24 23:33:53 +09:00
parent 4a908d970a
commit 02f1788261
5 changed files with 165 additions and 27 deletions

View File

@@ -23,7 +23,7 @@ sys.path.append(glob_path)
import cm_global
from manager_util import *
version = [2, 51, 9]
version = [2, 52]
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')
@@ -408,6 +408,7 @@ def execute_install_script(url, repo_path, lazy_mode=False, instant_execution=Fa
else:
if os.path.exists(requirements_path):
print("Install: pip packages")
pip_fixer = PIPFixer(get_installed_packages())
with open(requirements_path, "r") as requirements_file:
for line in requirements_file:
#handle comments
@@ -430,6 +431,8 @@ def execute_install_script(url, repo_path, lazy_mode=False, instant_execution=Fa
if package_name.strip() != "" and not package_name.startswith('#'):
try_install_script(url, repo_path, install_cmd, instant_execution=instant_execution)
pip_fixer.fix_broken()
if os.path.exists(install_script_path):
print(f"Install: install script")
install_cmd = [sys.executable, "install.py"]