forked from Hukasx0/character-factory
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall windows.bat
49 lines (43 loc) · 1.27 KB
/
install windows.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
46
47
48
49
@echo off
setlocal EnableDelayedExpansion
:: Check if virtual environment already exists
if not exist "venv\Scripts\activate.bat" (
echo Creating virtual environment...
python -m venv venv
if errorlevel 1 (
echo Failed to create virtual environment
pause
exit /b 1
)
)
:: Activate virtual environment
call venv\Scripts\activate.bat
:: Upgrade pip
echo Upgrading pip...
python -m pip install --upgrade pip
if errorlevel 1 (
echo Failed to upgrade pip
pause
exit /b 1
)
:: Install requirements from requirements.txt
if exist requirements.txt (
echo Installing or upgrading requirements from requirements.txt...
pip install -r requirements.txt --use-deprecated=legacy-resolver --no-cache-dir --ignore-installed
if errorlevel 1 (
echo Failed to install some packages from requirements.txt, but continuing...
)
) else (
echo WARNING: requirements.txt not found!
)
:: Verify Python executable path and installed packages
where python
pip list
:: Installation complete
echo ========================================================
echo Installation complete!
echo Virtual environment created at: venv
echo Python packages installed successfully.
echo ========================================================
pause
endlocal