Update one_click.py to initialize site_packages_path variable (#4118)

This commit is contained in:
Nathan Thomas 2023-09-28 19:31:29 +08:00 committed by GitHub
parent 3fb1e0236a
commit e145d9a0da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,6 +55,7 @@ def cpu_has_avx2():
def torch_version():
site_packages_path = None
for sitedir in site.getsitepackages():
if "site-packages" in sitedir and conda_env_path in sitedir:
site_packages_path = sitedir
@ -69,6 +70,7 @@ def torch_version():
def is_installed():
site_packages_path = None
for sitedir in site.getsitepackages():
if "site-packages" in sitedir and conda_env_path in sitedir:
site_packages_path = sitedir