-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: bubbles the dev <[email protected]>
- Loading branch information
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
@echo off | ||
setlocal | ||
|
||
:: Check for Python installation | ||
echo Checking for Python installation... | ||
python --version >nul 2>&1 | ||
if %errorlevel% neq 0 ( | ||
echo Python is not installed. Please install Python before running this script. | ||
pause | ||
exit /b 1 | ||
) | ||
|
||
:: Check for pip installation | ||
echo Checking for pip installation... | ||
pip --version >nul 2>&1 | ||
if %errorlevel% neq 0 ( | ||
echo pip is not installed. Installing pip... | ||
python -m ensurepip --upgrade | ||
if %errorlevel% neq 0 ( | ||
echo Failed to install pip. Please install pip manually. | ||
pause | ||
exit /b 1 | ||
) | ||
) | ||
|
||
:: Create a virtual environment | ||
echo Creating virtual environment... | ||
python -m venv venv | ||
if %errorlevel% neq 0 ( | ||
echo Failed to create virtual environment. Please check your Python installation. | ||
pause | ||
exit /b 1 | ||
) | ||
|
||
:: Activate the virtual environment | ||
echo Activating virtual environment... | ||
call venv\Scripts\activate.bat | ||
if %errorlevel% neq 0 ( | ||
echo Failed to activate virtual environment. Please check your virtual environment setup. | ||
pause | ||
exit /b 1 | ||
) | ||
|
||
:: Install psutil and tabulate | ||
echo Installing psutil and tabulate... | ||
pip install psutil tabulate | ||
if %errorlevel% neq 0 ( | ||
echo Failed to install psutil and tabulate. Please check your internet connection and pip configuration. | ||
pause | ||
exit /b 1 | ||
) | ||
|
||
echo psutil and tabulate have been successfully installed in the virtual environment. | ||
pause | ||
|
||
endlocal |