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

@@ -1216,6 +1216,11 @@ def restart(self):
exit(0)
print(f"\nRestarting... [Legacy Mode]\n\n")
sys_argv = sys.argv.copy()
if '--windows-standalone-build' in sys_argv:
sys_argv.remove('--windows-standalone-build')
if sys.platform.startswith('win32'):
return os.execv(sys.executable, ['"' + sys.executable + '"', '"' + sys.argv[0] + '"'] + sys.argv[1:])
else: