Fix a conflict where the system-wide python gets picked up on some Windows PCs

This commit is contained in:
cmdr2
2025-07-25 14:28:54 +05:30
parent 0daf5ea9f6
commit afcf85c3f7
2 changed files with 12 additions and 6 deletions

View File

@ -12,6 +12,9 @@ if exist "installer_files\env" set PATH=%cd%\installer_files\env;%cd%\installer_
set PYTHONPATH=%cd%\installer;%cd%\installer_files\env
set PYTHON=%cd%\installer_files\env\python.exe
echo PYTHON=%PYTHON%
@rem activate the installer env
call conda activate
@ -37,8 +40,8 @@ if exist "stable-diffusion\env" (
set PYTHONPATH=%cd%\stable-diffusion\env\lib\site-packages
)
call where python
call python --version
@REM call where python
call "%PYTHON%" --version
echo PYTHONPATH=%PYTHONPATH%

View File

@ -67,14 +67,17 @@ set PYTHONNOUSERSITE=1
set PYTHONPATH=%INSTALL_ENV_DIR%\lib\site-packages
echo PYTHONPATH=%PYTHONPATH%
set PYTHON=%INSTALL_ENV_DIR%\python.exe
echo PYTHON=%PYTHON%
@rem Download the required packages
call where python
call python --version
@REM call where python
call "%PYTHON%" --version
@rem this is outside check_modules.py to ensure that the required version of torchruntime is present
call python -m pip install -q "torchruntime>=1.19.1"
call "%PYTHON%" -m pip install -q "torchruntime>=1.19.1"
call python scripts\check_modules.py --launch-uvicorn
call "%PYTHON%" scripts\check_modules.py --launch-uvicorn
pause
exit /b