Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds check for Python 3.10 and print error message if required version not detected. #3598

Merged
merged 9 commits into from
May 16, 2023
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