Open milagorecki opened 2 years ago
Hello,
I also had this issue while importing whynot and got the same import error for EnvRegistry in Gym. Thanks to what @milagorecki suggested, installing the gym version 0.23.0 fixed the issue for me, however, it would be nice if you could make changes in the code accordingly to resolve this issue so others won't get stuck.
Thanks!
As @milagorecki said, to fix this issue adequately, we'd have to make whynot consistent with the current gym versions that have changed. We'd love to have help with that and I'd greatly appreciate any contributions from the community.
hey! awesome package! It's exactly what I was aiming to develop so I'm happy I found it. I'll spend some time trying to update it, so I can take this issue. But first I'd like to set-up a few things so it's usable again by the broader community. :) Cheers!
The PR fixes this issue in the sense that's now using gym 0.23 by default. However, instead of working on further versions of gym, my preferred course of action would be working on compatibility for gymnasium. gym was discontinued by OpenAI and gymanasium (its continuation) was picked up by Farama.
Thanks for your contribution!
Hi,
I just started looking into that repo and went into troubles when trying to import the package in Python. I set up a new virtual environment with only whynot and dependencies installed (Python 3.8.14). Then, when running
import whynot as wn
, I get the following error:Because this seems to be related to gym (by default version 0.26.2 got installed), I tried out different gym versions and indeed with gym version 0.23.0 or lower the import works. So maybe, a quick-fix could be to restrict the gym version. It seems that from version 0.24.0 onwards, the gym registry module/API got changed causing an issue when importing whynot.
Having gym 0.23.0 installed, allows me to run the performative prediction example, which is what I'm currently interested in. However, in the walkthrough example there still occurs an error when running the simulator of world3:
dataset = experiment.run(num_samples=200, seed=1234, show_progress=True)
I couldn't resolve that so far.