Farama-Foundation / MAgent2

An engine for high performance multi-agent environments with very large numbers of agents, along with a set of reference environments
https://magent2.farama.org
MIT License
201 stars 34 forks source link

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

Open Carton9 opened 1 year ago

Carton9 commented 1 year ago

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 commented 1 year ago

same problem

Arosseau commented 1 year ago

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 commented 1 year ago

same problem

scottmayberry commented 1 year ago

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.