SXXXXXXX_RadarDataReader/_req_packages/install_packages.bat

28 lines
1.2 KiB
Batchfile

@echo off & cls
echo ------------------------------------
echo Package Installer for radar_data_reader
echo ------------------------------------
echo.
echo Checking for pip...
python -m pip --version >nul 2>&1 & if errorlevel 1 ( python3 -m pip --version >nul 2>&1 & if errorlevel 1 ( goto :pip_error ) )
echo pip found. & goto :install
:pip_error
echo ERROR: Python pip module not found.
echo Please install pip for your Python environment. See:
echo https://pip.pypa.io/en/stable/installation/
echo. & pause & exit /b 1
:install
echo Installing packages from local folder using 'requirements.txt'...
echo Source: %~dp0
echo.
python -m pip install --no-index --find-links "%~dp0" -r "%~dp0requirements.txt" --disable-pip-version-check || ( python3 -m pip install --no-index --find-links "%~dp0" -r "%~dp0requirements.txt" --disable-pip-version-check || ( goto :install_error ) )
echo. & echo --------------------------
echo Installation Successful!
echo --------------------------
echo. & pause & exit /b 0
:install_error
echo. & echo --------------------------
echo ERROR: Installation Failed.
echo --------------------------
echo Please check the messages above for details. & pause & exit /b 1