-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.bat
32 lines (24 loc) · 924 Bytes
/
run.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
@echo off
set PYTHON_VERSION=3.11.0
set PYTHON_MSI=python-%PYTHON_VERSION%.msi
echo Checking if python is installed...
python --version > nul 2>&1
if errorlevel 9009 (
echo Installing python...
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://www.python.org/ftp/python/%PYTHON_VERSION%/python-3.11.0-amd64.exe', 'python-3.11.0-amd64.exe')"
python-3.11.0-amd64.exe /quiet InstallAllUsers=1 PrependPath=1
start "" "%~f0"
exit
)
echo Creating virtual environment...
python -m venv %~dp0.venv
call .\.venv\Scripts\activate.bat
echo Upgrading pip...
python -m pip install --upgrade pip
echo Installing dependencies...
FOR /F %%i IN (requirements.txt) DO python -m pip install %%i
echo Running main.py...
python main.py
pause
@REM Batch file "install-python-and-requirements-and-run-main.bat" made by nichind (https://github.com/nichind)
@REM Please do not remove this comment. ^-^