From 524612cee5b90e27b119a9ddb86adada85e97ca4 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Fri, 1 Sep 2023 13:09:01 +0530 Subject: [PATCH] Different PYTHONPATH for Windows and Linux/Mac --- scripts/check_modules.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/check_modules.py b/scripts/check_modules.py index 67bd7a7c..25a7ea56 100644 --- a/scripts/check_modules.py +++ b/scripts/check_modules.py @@ -250,7 +250,10 @@ def launch_uvicorn(): os.environ["SD_PATH"] = str(Path(Path.cwd(), "stable-diffusion")) os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1" - os.environ["PYTHONPATH"] = str(Path( os.environ["INSTALL_ENV_DIR"], "lib", "python3.8", "site-packages")) + if os_name == "Windows": + os.environ["PYTHONPATH"] = str(Path( os.environ["INSTALL_ENV_DIR"], "lib", "site-packages")) + else: + os.environ["PYTHONPATH"] = str(Path( os.environ["INSTALL_ENV_DIR"], "lib", "python3.8", "site-packages")) os.environ["SD_UI_PATH"] = str(Path(Path.cwd(), "ui")) print(f"PYTHONPATH={os.environ['PYTHONPATH']}")