Correct PATH

This commit is contained in:
cmdr2 2022-10-10 21:07:30 +05:30
parent 9aa46f92dc
commit 7219c55dcd
2 changed files with 3 additions and 1 deletions

View File

@ -30,7 +30,7 @@ Downloading packages necessary for Stable Diffusion UI..
def is_valid_env():
path = os.environ['PATH']
path += os.path.join(app.project_env_dir_path, 'Scripts' if platform.system() == 'Windows' else 'bin')
path += ';' + os.path.join(app.project_env_dir_path, 'Scripts' if platform.system() == 'Windows' else 'bin')
if shutil.which("uvicorn", path=path) is None:
helpers.log("uvicorn not found!")

View File

@ -1,4 +1,5 @@
import os
import platform
from installer import app, helpers
@ -9,6 +10,7 @@ def run():
env['SD_DIR'] = app.stable_diffusion_repo_dir_path
env['PYTHONPATH'] = app.stable_diffusion_repo_dir_path + ';' + os.path.join(app.project_env_dir_path, 'lib', 'site-packages')
env['SD_UI_PATH'] = app.ui_dir_path
env['PATH'] += ';' + os.path.join(app.project_env_dir_path, 'Scripts' if platform.system() == 'Windows' else 'bin')
helpers.log(f'PYTHONPATH={env["PYTHONPATH"]}')
helpers.run('python --version', log_the_cmd=True)