diff --git a/gui.bat b/gui.bat index 9b14c5dfe..34b7bcb16 100644 --- a/gui.bat +++ b/gui.bat @@ -6,6 +6,9 @@ set "yellow_text=" set "blue_text=" set "reset_text=" +:: Deactivate the virtual environment +call .\venv\Scripts\deactivate.bat + REM Run pip freeze and capture the output for /f "delims=" %%I in ('pip freeze') do ( set "pip_output=%%I" diff --git a/setup.bat b/setup.bat index 3bec1156b..2635330c9 100644 --- a/setup.bat +++ b/setup.bat @@ -6,6 +6,23 @@ set "yellow_text=" set "blue_text=" set "reset_text=" +set PYTHON_VER=3.10.9 + +REM Check if Python version meets the recommended version +python --version 2>nul | findstr /b /c:"Python %PYTHON_VER%" >nul +if errorlevel 1 ( + echo Warning: Python version %PYTHON_VER% is recommended. +) + +IF NOT EXIST venv ( + python -m venv venv +) ELSE ( + echo venv folder already exists, skipping creation... +) + +:: Deactivate the virtual environment +call .\venv\Scripts\deactivate.bat + REM Run pip freeze and capture the output for /f "delims=" %%I in ('pip freeze') do ( set "pip_output=%%I" @@ -52,19 +69,6 @@ if /i "%choice%"=="1" ( :ContinueSetup endlocal -set PYTHON_VER=3.10.9 - -REM Check if Python version meets the recommended version -python --version 2>nul | findstr /b /c:"Python %PYTHON_VER%" >nul -if errorlevel 1 ( - echo Warning: Python version %PYTHON_VER% is recommended. -) - -IF NOT EXIST venv ( - python -m venv venv -) ELSE ( - echo venv folder already exists, skipping creation... -) call .\venv\Scripts\activate.bat REM Upgrade pip if needed