-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.bat
More file actions
36 lines (28 loc) · 715 Bytes
/
run.bat
File metadata and controls
36 lines (28 loc) · 715 Bytes
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
@echo off
setlocal
REM Define your project directory
set "PROJECT_DIR=%~dp0"
cd /d "%PROJECT_DIR%"
REM Check if venv directory exists
if not exist "venv" (
echo Creating virtual environment...
python -m venv venv
)
REM Activate the virtual environment
call venv\Scripts\activate
REM Upgrade pip to avoid issues with older versions
python -m pip install --upgrade pip
REM Install required packages
if exist "requirements.txt" (
echo Installing dependencies...
pip install -r requirements.txt
) else (
echo requirements.txt not found!
)
REM Run the Python script
echo Running application...
python app.py
REM Deactivate the virtual environment
deactivate
REM Pause to see any output
pause