py_projects/projects/GetRequirements.bat
AlexVeeBee 4b9567749c Sort
2024-01-24 18:05:08 +00:00

44 lines
815 B
Batchfile
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
setlocal EnableDelayedExpansion
set "RESET="
set "BLUE="
set "GREEN="
set "RED="
set "YELLOW="
set "WHITE="
echo %BLUE%Get Requirements%RESET%
@REM is python installed?
python --version >nul 2>&1
if %errorlevel% neq 0 (
echo "python not installed"
winget install -e --id Python.Python
echo %RED%Try launching this script again%RESET%
pause
exit /b 1
)
echo %GREEN%Python installed%RESET%
@REM is pip installed?
pip --version >nul 2>&1
if %errorlevel% neq 0 (
echo "pip not installed"
pause
exit /b 1
)
echo %GREEN%Pip installed%RESET%
@REM check if requirements.txt exists
if not exist "requirements.txt" (
echo "requirements.txt not found"
pause
exit /b 1
)
set "file=requirements.txt"
pip install -r %file%
pause