AutoGPT
AutoGPT copied to clipboard
No module named 'dotenv'
⚠️ 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?
Windows
Which version of Auto-GPT are you using?
Latest Release
GPT-3 or GPT-4?
GPT-3.5
Steps to reproduce 🕹
Running ./run.bat
Current behavior 😯
The autogpt doesnt run properly
Expected behavior 🤔
run the autogpt
Your prompt 📝
NO prompt
Your Logs 📒
PS C:\AI\Auto-GPT> ./run.bat
Traceback (most recent call last):
File "C:\AI\Auto-GPT\scripts\check_requirements.py", line 4, in <module>
import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'
Installing missing packages...
C:\Libraries\msys64\mingw64\bin\python.exe: No module named pip
Traceback (most recent call last):
File "C:\Libraries\msys64\mingw64\lib\python3.10\runpy.py", line 187, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "C:\Libraries\msys64\mingw64\lib\python3.10\runpy.py", line 146, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "C:\Libraries\msys64\mingw64\lib\python3.10\runpy.py", line 110, in _get_module_details
__import__(pkg_name)
File "C:\AI\Auto-GPT\autogpt\__init__.py", line 5, in <module>
from dotenv import load_dotenv
ModuleNotFoundError: No module named 'dotenv'
running pip install python-dotenv and pip3 install python-dotenv should do the trick
So, I just ran into the same issue. python-dotenv is referenced in the requirements.txt file and installed that way, it is also listed when using the pip list command.
So, I've figured out this issue (for my case): python was aliased to /usr/bin/python3, but it needed to be aliased to /opt/homebrew/bin/python3. For some reason, the version difference between the two matters.
I figured it out too, turns out I had multiple python installations so i fixed it by running the program in virtual environment
Closing as OP indicates he's fixed the issue
I am having the same issue. How was it fixed and how do I do it? Thank you for your help.
I added this to my .zprofile. (This is using HomeBrew on MacOS. Depending on your system or how you installed python3, you may need a different approach.)
alias python=/opt/homebrew/bin/python3
alias pip=/opt/homebrew/bin/pip3