@echo off setlocal set venv_dir=%~dp0..\.venv if exist %venv_dir% ( if "%1"=="--force" ( echo Removing python virtual environment rmdir /S /Q %venv_dir% ) else ( GOTO END ) ) echo Creating python virtual environment @call python -m venv %venv_dir% @call %venv_dir%\Scripts\activate.bat @call %venv_dir%\Scripts\python -m pip install --upgrade pip @call %venv_dir%\Scripts\pip install -r %~dp0..\requirements.txt @call deactivate :END EXIT /B %ERRORLEVEL% :ERROR EXIT /B 1