-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstall.bat
More file actions
108 lines (92 loc) · 2.5 KB
/
install.bat
File metadata and controls
108 lines (92 loc) · 2.5 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
@echo off
setlocal EnableDelayedExpansion
echo Checking for Python installation...
REM Try to find python executable
where python >nul 2>nul
if %errorlevel% equ 0 (
set PYTHON_CMD=python
goto :FOUND
)
where python3 >nul 2>nul
if %errorlevel% equ 0 (
set PYTHON_CMD=python3
goto :FOUND
)
where py >nul 2>nul
if %errorlevel% equ 0 (
set PYTHON_CMD=py
goto :FOUND
)
echo.
echo [ERROR] Python was not found!
echo.
echo Troubleshooting steps:
echo 1. Ensure Python is installed from python.org or Microsoft Store.
echo 2. If installed from Microsoft Store, search for "Manage App Execution Aliases" in Windows Settings
echo and ensure "python.exe" and "python3.exe" are turned ON.
echo 3. If installed from python.org, ensure "Add Python to PATH" was checked during installation.
echo.
pause
exit /b 1
:FOUND
echo Found Python: !PYTHON_CMD!
echo.
echo Installing dependencies from requirements.txt...
!PYTHON_CMD! -m pip install -r requirements.txt
if %errorlevel% neq 0 (
echo.
echo [ERROR] Failed to install dependencies.
echo Please check your internet connection or try running as Administrator.
pause
exit /b 1
)
echo.
echo [SUCCESS] Dependencies installed successfully!
echo You can now run the scraper using run_tui.bat
pause
@echo off
setlocal EnableDelayedExpansion
echo Checking for Python installation...
REM Try to find python executable
where python >nul 2>nul
if %errorlevel% equ 0 (
set PYTHON_CMD=python
goto :FOUND
)
where python3 >nul 2>nul
if %errorlevel% equ 0 (
set PYTHON_CMD=python3
goto :FOUND
)
where py >nul 2>nul
if %errorlevel% equ 0 (
set PYTHON_CMD=py
goto :FOUND
)
echo.
echo [ERROR] Python was not found!
echo.
echo Troubleshooting steps:
echo 1. Ensure Python is installed from python.org or Microsoft Store.
echo 2. If installed from Microsoft Store, search for "Manage App Execution Aliases" in Windows Settings
echo and ensure "python.exe" and "python3.exe" are turned ON.
echo 3. If installed from python.org, ensure "Add Python to PATH" was checked during installation.
echo.
pause
exit /b 1
:FOUND
echo Found Python: !PYTHON_CMD!
echo.
echo Installing dependencies from requirements.txt...
!PYTHON_CMD! -m pip install -r requirements.txt
if %errorlevel% neq 0 (
echo.
echo [ERROR] Failed to install dependencies.
echo Please check your internet connection or try running as Administrator.
pause
exit /b 1
)
echo.
echo [SUCCESS] Dependencies installed successfully!
echo You can now run the scraper using run_tui.bat
pause