-
Notifications
You must be signed in to change notification settings - Fork 44.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Richard Beales <rich@richbeales.net>
- Loading branch information
1 parent
fad24b3
commit ad8b8cb
Showing
1 changed file
with
20 additions
and
4 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 |
---|---|---|
@@ -1,8 +1,24 @@ | ||
@echo off | ||
python scripts/check_requirements.py requirements.txt | ||
setlocal enabledelayedexpansion | ||
|
||
:FindPythonCommand | ||
for %%A in (python python3) do ( | ||
where /Q %%A | ||
if !errorlevel! EQU 0 ( | ||
set "PYTHON_CMD=%%A" | ||
goto :Found | ||
) | ||
) | ||
|
||
echo Python not found. Please install Python. | ||
pause | ||
exit /B 1 | ||
|
||
:Found | ||
%PYTHON_CMD% scripts/check_requirements.py requirements.txt | ||
if errorlevel 1 ( | ||
echo Installing missing packages... | ||
pip install -r requirements.txt | ||
%PYTHON_CMD% -m pip install -r requirements.txt | ||
) | ||
python -m autogpt %* | ||
pause | ||
%PYTHON_CMD% -m autogpt %* | ||
pause |