Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

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

amokduke627aeb20a2d1
diff --git a/run.sh b/run.sh
index b4155d8818..6246355572 100755
--- a/run.sh
+++ b/run.sh
@@ -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..."
\ No newline at end of file
+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
\ No newline at end of file