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

pin the gym version in the requirements.txt, latest gym breaks pfrl #166

Closed
erwincoumans opened this issue Mar 10, 2022 · 1 comment · Fixed by #167
Closed

pin the gym version in the requirements.txt, latest gym breaks pfrl #166

erwincoumans opened this issue Mar 10, 2022 · 1 comment · Fixed by #167
Assignees

Comments

@erwincoumans
Copy link

Getting an error, probably due to versioning issue between pfrl 0.2.1 and gym 0.23.0:

d:\python-x64\lib\site-packages\pfrl\wrappers\monitor.py line 4: ImportError: cannot import name 'Monitor' from 'gym.wrappers' (D:\python-x64\lib\site-packages\gym\wrappers_init_.py)

python -m pip list
Package                              Version   Location
------------------------------------ --------- -----------------------
gym                                  0.23.0
pfrl                                 0.2.1

Downgrading gym fixes it:

python -m pip uninstall gym
python -m pip install gym==0.14.0

Could you pin the gym version in the requirements.txt?

@muupan muupan self-assigned this Mar 11, 2022
@muupan
Copy link
Member

muupan commented Mar 11, 2022

Thanks for reporting the issue! I reproduced this in my environment. import pfrl fails for gym==0.23.0 due to the removal of Monitor class. This issue must be fixed. A workaround is to use gym<=0.22.0.

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

Successfully merging a pull request may close this issue.

2 participants