ModuleNotFoundError: No module named 'distro'
⚠️ Search for existing issues first ⚠️
- [X] I have searched the existing issues, and there is no existing issue for my problem
Which Operating System are you using?
Devcontainer / Codespace
Which version of Auto-GPT are you using?
Stable (branch)
GPT-3 or GPT-4?
GPT-3.5
Steps to reproduce 🕹
use gitpod to open and run . /run.sh
Current behavior 😯
it prompted ModuleNotFoundError: No module named 'distro'
Expected behavior 🤔
The program is running normally and chatgpt can be used normally
Your prompt 📝
N/a
Your Logs 📒
Traceback (most recent call last):
File "/nix/store/fdqpyj613dr0v1l1lrzqhzay7sk4xg87-python3-3.10.10/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/nix/store/fdqpyj613dr0v1l1lrzqhzay7sk4xg87-python3-3.10.10/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/workspace/Auto-GPT/autogpt/main.py", line 5, in
autogpt.cli.main()
File "/nix/store/c424f8r8i3n7zyd11vzg59yw0d5xf0vn-python3.10-click-8.1.3/lib/python3.10/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/nix/store/c424f8r8i3n7zyd11vzg59yw0d5xf0vn-python3.10-click-8.1.3/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/nix/store/c424f8r8i3n7zyd11vzg59yw0d5xf0vn-python3.10-click-8.1.3/lib/python3.10/site-packages/click/core.py", line 1635, in invoke
rv = super().invoke(ctx)
File "/nix/store/c424f8r8i3n7zyd11vzg59yw0d5xf0vn-python3.10-click-8.1.3/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/nix/store/c424f8r8i3n7zyd11vzg59yw0d5xf0vn-python3.10-click-8.1.3/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/nix/store/c424f8r8i3n7zyd11vzg59yw0d5xf0vn-python3.10-click-8.1.3/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/workspace/Auto-GPT/autogpt/cli.py", line 87, in main
from autogpt.main import run_auto_gpt
File "/workspace/Auto-GPT/autogpt/main.py", line 8, in
from autogpt.agent.agent import Agent
File "/workspace/Auto-GPT/autogpt/agent/init.py", line 1, in
from autogpt.agent.agent import Agent
File "/workspace/Auto-GPT/autogpt/agent/agent.py", line 3, in
from autogpt.app import execute_command, get_command
File "/workspace/Auto-GPT/autogpt/app.py", line 5, in
from autogpt.agent.agent_manager import AgentManager
File "/workspace/Auto-GPT/autogpt/agent/agent_manager.py", line 6, in
from autogpt.config.config import Config
File "/workspace/Auto-GPT/autogpt/config/init.py", line 4, in
from autogpt.config.ai_config import AIConfig
File "/workspace/Auto-GPT/autogpt/config/ai_config.py", line 12, in
import distro
ModuleNotFoundError: No module named 'distro'
Same problem here, and pip is installed correctly (Version 23.0.1)
Same here, with pip install loop
Same here, running through nix
Hi @lqtaaaa try reinstalling from requirements.txt file and try again. distro module should be made available and visible when you pip freeze.
Closing issue.
Had the same issue after I did a git pull to update auto-gpt Thx to @Qoyyuum I was able to solve the issue. FYI this is the command you need to run within the repo to reinstall everything from requirments.txt:
pip install -r requirements.txt