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.
fix: Fix poetry env issues with the agent's entrypoint scripts
Reinier van der Leer674363699667
diff --git a/autogpts/autogpt/autogpt.bat b/autogpts/autogpt/autogpt.batindex 22462f007c..12b89f2123 100644--- a/autogpts/autogpt/autogpt.bat+++ b/autogpts/autogpt/autogpt.bat@@ -2,7 +2,7 @@setlocal enabledelayedexpansion:FindPythonCommand-for %%A in (python python3) do (+for %%A in (python3 python) do (where /Q %%Aif !errorlevel! EQU 0 (set "PYTHON_CMD=%%A"@@ -18,10 +18,10 @@ exit /B 1%PYTHON_CMD% scripts/check_requirements.pyif errorlevel 1 (echo- %PYTHON_CMD% -m poetry install --without dev+ poetry install --without devechoecho Finished installing packages! Starting AutoGPT...echo)-%PYTHON_CMD% -m autogpt %*+poetry run autogpt %*pausediff --git a/autogpts/autogpt/autogpt.sh b/autogpts/autogpt/autogpt.shindex 9246a433f4..57e1f4192d 100755--- a/autogpts/autogpt/autogpt.sh+++ b/autogpts/autogpt/autogpt.sh@@ -1,12 +1,12 @@#!/usr/bin/env bashfunction find_python_command() {- if command -v python &> /dev/null- then- echo "python"- elif command -v python3 &> /dev/null+ if command -v python3 &> /dev/nullthenecho "python3"+ elif command -v python &> /dev/null+ then+ echo "python"elseecho "Python not found. Please install Python."exit 1@@ -16,16 +16,14 @@ function find_python_command() {PYTHON_CMD=$(find_python_command)if $PYTHON_CMD -c "import sys; sys.exit(sys.version_info < (3, 10))"; then- $PYTHON_CMD scripts/check_requirements.py- if [ $? -eq 1 ]- then+ if ! $PYTHON_CMD scripts/check_requirements.py; thenecho- $PYTHON_CMD -m poetry install --without dev+ poetry install --without devechoecho "Finished installing packages! Starting AutoGPT..."echofi- $PYTHON_CMD -m autogpt "$@"+ poetry run autogpt "$@"elseecho "Python 3.10 or higher is required to run Auto GPT."fi