mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-01-28 10:24:26 +01:00
Inspired by #1102 * Migrate AutoGPT agent to poetry Co-authored-by: rickythefox <richard@ginzburg.se> * Rewrite automatic dependency check (check_requirements.py) for poetry * Sort dependencies * Add instructions for poetry to README
32 lines
736 B
Bash
Executable File
32 lines
736 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
function find_python_command() {
|
|
if command -v python &> /dev/null
|
|
then
|
|
echo "python"
|
|
elif command -v python3 &> /dev/null
|
|
then
|
|
echo "python3"
|
|
else
|
|
echo "Python not found. Please install Python."
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
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
|
|
echo
|
|
$PYTHON_CMD -m poetry install --without dev
|
|
echo
|
|
echo "Finished installing packages! Starting AutoGPT..."
|
|
echo
|
|
fi
|
|
$PYTHON_CMD -m autogpt "$@"
|
|
else
|
|
echo "Python 3.10 or higher is required to run Auto GPT."
|
|
fi
|