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
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
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