-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.bat
45 lines (37 loc) · 1.34 KB
/
setup.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@echo off
echo ========================================
echo Python Dependency Installer and Runner
echo ========================================
:: Check if Python is installed
python --version >nul 2>&1
if %errorlevel% neq 0 (
echo Python is not installed. Installing Python...
:: Download the Python installer (adjust the URL to the latest version as needed)
powershell -Command "Invoke-WebRequest -Uri https://www.python.org/ftp/python/3.11.6/python-3.11.6-amd64.exe -OutFile python-installer.exe"
:: Run the installer silently
start /wait python-installer.exe /quiet InstallAllUsers=1 PrependPath=1
:: Verify Python installation
python --version >nul 2>&1
if %errorlevel% neq 0 (
echo ERROR: Python installation failed. Please install Python manually.
pause
exit /b
)
echo Python installed successfully!
)
:: Upgrade pip to the latest version
echo Upgrading pip to the latest version...
python -m pip install --upgrade pip
:: Install required dependencies
echo Installing pillow...
pip install pillow
:: Check for installation success
if %errorlevel% neq 0 (
echo ERROR: Failed to install one or more dependencies.
pause
exit /b
)
echo ========================================
echo All dependencies installed successfully!
echo ========================================
pause