AutoGPT: ModuleNotFoundError: No module named 'autogpt'

Duplicates

  • I have searched the existing issues

Steps to reproduce 🕹

Latest pull from today

Current behavior 😯

Error, see message below (guessing this is related to the renaming of the main folder) ??

Expected behavior 🤔

To ingest data

Your prompt 📝

# python autogpt/data_ingestion.py -h
$ python autogpt/data_ingestion.py
Traceback (most recent call last):
  File "E:\anc\Auto-GPT\autogpt\data_ingestion.py", line 4, in <module>
    from autogpt.config import Config
ModuleNotFoundError: No module named 'autogpt'

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 7
  • Comments: 48 (9 by maintainers)

Most upvoted comments

Please do not run pip install autogpt. Someone claimed that package and it does not belong to us.

Move the Auto-GPT/autogpt/data_ingestion.py file into the base Auto-GPT folder. Auto-GPT/data_ingestion.py is where it should be.

PR here https://github.com/Significant-Gravitas/Auto-GPT/pull/1679

pip install autogpt

someuser@RYZEN MINGW64 /e/NodeJSCourse/Auto-GPT (master)
$ pip install autogpt
Requirement already satisfied: autogpt in c:\users\someuser\appdata\local\programs\python\python311\lib\site-packages (0.0.1.dev0)
Requirement already satisfied: torch in c:\users\someuser\appdata\local\programs\python\python311\lib\site-packages (from autogpt) (2.0.0)
Requirement already satisfied: filelock in c:\users\someuser\appdata\local\programs\python\python311\lib\site-packages (from torch->autogpt) (3.11.0)        
Requirement already satisfied: typing-extensions in c:\users\someuser\appdata\local\programs\python\python311\lib\site-packages (from torch->autogpt) (4.5.0)
Requirement already satisfied: sympy in c:\users\someuser\appdata\local\programs\python\python311\lib\site-packages (from torch->autogpt) (1.11.1)
Requirement already satisfied: networkx in c:\users\someuser\appdata\local\programs\python\python311\lib\site-packages (from torch->autogpt) (3.1)
Requirement already satisfied: jinja2 in c:\users\someuser\appdata\local\programs\python\python311\lib\site-packages (from torch->autogpt) (3.1.2)
Requirement already satisfied: MarkupSafe>=2.0 in c:\users\someuser\appdata\local\programs\python\python311\lib\site-packages (from jinja2->torch->autogpt) (2.1.2)
Requirement already satisfied: mpmath>=0.19 in c:\users\someuser\appdata\local\programs\python\python311\lib\site-packages (from sympy->torch->autogpt) (1.3.0)

someuser@RYZEN MINGW64 /e/NodeJSCourse/Auto-GPT (master)
$ python 'e:/NodeJSCourse/Auto-GPT/autogpt/data_ingestion.py' -h
Traceback (most recent call last):
  File "e:\NodeJSCourse\Auto-GPT\autogpt\data_ingestion.py", line 4, in <module>
    from autogpt.config import Config
ModuleNotFoundError: No module named 'autogpt'

same problem

I don’t believe the OP has fixed this issue, yet.

Hello I have the same problem (✚1)

Issue is fixed as OP can run python -m autogpt correctly. Closing issue.

I am also seeing this error while trying to get this up and running in docker.

$ docker run -it --env-file=./.env -v $PWD/auto_gpt_workspace:/app/auto_gpt_workspace autogpt

/usr/local/bin/python: No module named autogpt

Same here master stable and Auto-GPT v0.2.0.zip

Hi, I solved the issue with this comand, just change the number to the versión of python you are using: py -3.11 -m autogpt

This worked for me:

os.chdir(‘/content/Auto-GPT’) # Set the working directory to Auto-GPT sys.path.append(os.path.abspath(‘./autogpt’)) # Add the “autogpt” folder to sys.path !python -m autogpt

Ah yup, this is my issue 😄 thank you!

@kala-here you’re having different issue. This particular one is about about people running data_ingestion.py

$ python autogpt/data_ingestion.py Traceback (most recent call last): File “E:\anc\Auto-GPT\autogpt\data_ingestion.py”, line 4, in <module> from autogpt.config import Config ModuleNotFoundError: No module named ‘autogpt’

in your case, IDK, make sure you’re running the stable release and not just git cloning this repo.

Can you please confirm you are using master branch at the moment?

I downloaded the recommended version at the top of the README.

This information takes precedence over any other information provided and should be followed accordingly. Our workflow has been improved, but please note that master branch may often be in a broken state. Please download the latest stable release from here: https://github.com/Torantulino/Auto-GPT/releases/latest.

Same problem with latest pull.

Yeah the fix for me was to find - replace all ‘autogpt.’ with nothing so ‘’

e.g

from autogpt.config import Config
from autogpt.file_operations import ingest_file, search_files
from autogpt.memory import get_memory

is now:

from config import Config
from file_operations import ingest_file, search_files
from memory import get_memory

– update, this worked when running this particular script one off. But when running python -m autogpt I was bombarded with import errors.

you can use my branch “dirty-fix-imports” here https://github.com/Wladastic/Auto-GPT

python scripts/main.py doesn’t work anymore.Try python -m autogpt without going to scripts directory. Also make sure to pip install -r requirements.txt or pip3 install -r requirements.txt

If that doesn’t work, pip install virtualenvwrapper-win and make virtualenv like this: mkvirtualenv autogpt and run the commands again

If it still doesn’t work, please try running ‘pip install autogpt’ directly.

This error may be caused by outdated code in autogpt. Please clone the repository again