-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.bat
More file actions
60 lines (51 loc) · 1.33 KB
/
Copy pathrun.bat
File metadata and controls
60 lines (51 loc) · 1.33 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
@echo off
echo Setting up CSV Data Processing Tool...
echo.
REM Create output directory if it doesn't exist
if not exist "output" mkdir output
REM Check if Python is installed
python --version >nul 2>&1
if errorlevel 1 (
echo ERROR: Python is not installed or not added to PATH.
echo Please install Python from https://www.python.org/downloads/
echo Make sure to check "Add Python to PATH" during installation.
pause
exit /b 1
)
echo Python found. Setting up virtual environment...
REM Create virtual environment if it doesn't exist
if not exist "venv" (
echo Creating virtual environment...
python -m venv venv
if errorlevel 1 (
echo ERROR: Failed to create virtual environment.
pause
exit /b 1
)
)
REM Activate virtual environment
echo Activating virtual environment...
call venv\Scripts\activate.bat
REM Install requirements
echo Installing required packages...
pip install -r requirements.txt
if errorlevel 1 (
echo ERROR: Failed to install required packages.
pause
exit /b 1
)
echo.
echo Setup complete! Running data processing...
echo.
REM Run the main program
python main.py
if errorlevel 1 (
echo ERROR: Failed to run main.py
pause
exit /b 1
)
echo.
echo Data processing completed successfully!
echo Check the 'output' folder for processed files.
echo.
pause