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 check for optional dependencies in check_requirements.py
Reinier van der Leer6d439f4f634f
diff --git a/autogpts/autogpt/scripts/check_requirements.py b/autogpts/autogpt/scripts/check_requirements.pyindex 8d7db6d3ed..c62520825c 100644--- a/autogpts/autogpt/scripts/check_requirements.py+++ b/autogpts/autogpt/scripts/check_requirements.py@@ -14,12 +14,12 @@ from poetry.factory import Factorydef main():poetry_project = Factory().create_poetry()- # repository = poetry_project.locker.locked_repository()- # dependencies = repository.packagesdependency_group = poetry_project.package.dependency_group("main")missing_packages = []for dep in dependency_group.dependencies:+ if dep.is_optional():+ continue# Try to verify that the installed version is suitablewith contextlib.suppress(ModuleNotFoundError):installed_version = version(dep.name) # if this fails -> not installed