Skip to content

Commit

Permalink
Create install_psutil_tabulate.bat
Browse files Browse the repository at this point in the history
Signed-off-by: bubbles the dev <[email protected]>
  • Loading branch information
KernFerm authored Aug 3, 2024
1 parent 4aa5789 commit b41c79f
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions install_psutil_tabulate.bat
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

0 comments on commit b41c79f

Please sign in to comment.