Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError #5

Open
EYUJin opened this issue May 1, 2021 · 4 comments
Open

ModuleNotFoundError #5

EYUJin opened this issue May 1, 2021 · 4 comments

Comments

@EYUJin
Copy link

EYUJin commented May 1, 2021

Hi, I am trying to run the slot_attention/train.py code in your repository, however, I keep getting stuck by a error reading...

Traceback (most recent call last):
  File "slot_attention/train.py", line 8, in <module>
    from slot_attention.data import CLEVRDataModule
ModuleNotFoundError: No module named 'slot_attention'

I cloned the git to a PC running on the Ubuntu operating system, and upon doing so, I ran the code within the highest directory of the cloned repository, as written in the Readme. Could you help me out with this issue?

@joshalbrecht
Copy link

What command are you running? From what directory? What is your PYTHONPATH set to?

@greeneggsandyaml
Copy link

To expand on the comment above, PYTHONPATH=. python slot_attention/train.py should solve this issue.

@EYUJin
Copy link
Author

EYUJin commented Jun 4, 2021 via email

@HHousen
Copy link

HHousen commented Jan 1, 2023

You can also use python -m slot_attention.train to run the training script as a module instead of changing the Python path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants