google-deepmind / meltingpot

A suite of test scenarios for multi-agent reinforcement learning.
Apache License 2.0
582 stars 118 forks source link

ImportError: cannot import name 'BaseParallelWrapper' from 'pettingzoo.utils' #128

Closed nkenschaft closed 1 year ago

nkenschaft commented 1 year ago

After following the installation instructions, I encounter the error in the title when trying to run the sb3_train.py script. I've tried multiple Python versions (3.9 & 3.10), reinstalling pettingzoo, etc, but nothing seems to work. Any help would be appreciated. Thanks!

nkenschaft commented 1 year ago

Turns out it's a typo (BaseParallelWrapper vs BaseParallelWraper) upstream in the PettingZoo repo. For anyone else who encounters this, it looks like someone is working on fixing it, so you can either wait for just go fix the typo yourself.

vcis-wangchenxu commented 1 year ago

I have the same question. Have you solved the problem

nkenschaft commented 1 year ago

As a quick and dirty fix, running find . -type f -exec sed -i 's/BaseParallelWraper/BaseParallelWrapper/g' {} + in the root directory of the project appears to do the trick. It's a bit hacky but it works until FaramaFoundation fixes PettingZoo. Edit: this is of course for *nix systems. If that's not what you're using, sorry and good luck!