Skip to content

Commit

Permalink
Adds check for Python 3.10 and print error message if required versio…
Browse files Browse the repository at this point in the history
…n not detected. (Significant-Gravitas#3598)

* Updated run script to check for Python 3.10 and above, and provide informative error messages for unsupported versions.

* Updated run script to check for Python 3.10 and above, and provide informative error messages for unsupported versions.

---------

Co-authored-by: merwanehamadi <[email protected]>
  • Loading branch information
amokduke and waynehamadi authored May 16, 2023
1 parent f424fac commit 627aeb2
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ function find_python_command() {

PYTHON_CMD=$(find_python_command)

$PYTHON_CMD scripts/check_requirements.py requirements.txt
if [ $? -eq 1 ]
then
echo Installing missing packages...
$PYTHON_CMD -m pip install -r requirements.txt
fi
$PYTHON_CMD -m autogpt $@
read -p "Press any key to continue..."
if $PYTHON_CMD -c "import sys; sys.exit(sys.version_info < (3, 10))"; then
$PYTHON_CMD scripts/check_requirements.py requirements.txt
if [ $? -eq 1 ]
then
echo Installing missing packages...
$PYTHON_CMD -m pip install -r requirements.txt
fi
$PYTHON_CMD -m autogpt $@
read -p "Press any key to continue..."
else
echo "Python 3.10 or higher is required to run Auto GPT."
fi

0 comments on commit 627aeb2

Please sign in to comment.