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: No module named 'magent2.environments' #14

Closed
Carton9 opened this issue Mar 3, 2023 · 5 comments
Closed

ModuleNotFoundError: No module named 'magent2.environments' #14

Carton9 opened this issue Mar 3, 2023 · 5 comments

Comments

@Carton9
Copy link

Carton9 commented Mar 3, 2023

I install the magent2 by command pip install magent2 and try to run the demon code. Yet it shows following error.

Traceback (most recent call last): File "****\test.py", line 1, in <module> from magent2.environments import battle_v4 ModuleNotFoundError: No module named 'magent2.environments'

@zzhixin
Copy link

zzhixin commented Mar 4, 2023

same problem

@Arosseau
Copy link

Arosseau commented Mar 9, 2023

I have the same problem. It must be something with the installer, since after installing there are only two files in the site-packages directory: libmagent.so and testlib. There is no init file and it seems all relevant code is missing. Also, on a different but related note: the example code heavily uses the pettingzoo lib, but there is no requirement for it (not in the toml file, not in requirements nor in setup).

@anthony0727
Copy link

same problem

@scottmayberry
Copy link

scottmayberry commented Mar 13, 2023

Solution that worked for me (credit to Carton9): After you run command pip install magent2, you need to download MAgent2/magent2/* and add all those files into your python library folder.

@atstarke
Copy link
Collaborator

Hello!

New Patch v0.3.3 was recently released to resolve this this issue thus no longer requires the workaround mentioned by @scottmayberry via @Carton9. Please open a new issue if any other issues are encountered after installing the updated version via pip install. This fix should allow the use of the library both locally and in a collaborative environment like Google Collab.

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

6 participants