pfnet / pfrl

PFRL: a PyTorch-based deep reinforcement learning library
MIT License
1.2k stars 157 forks source link

PFRL Installation does not work #181

Closed prabhatnagarajan closed 1 year ago

prabhatnagarajan commented 1 year ago

EDIT: Looks like this was addressed by this, https://github.com/pfnet/pfrl/pull/167. But the content belows seems to show that installing pfrl from pypi does not work. Could we have a new release?


If you install pfrl and then try to import pfrl, it does not work. To reproduce with conda:

conda create -n testenv python=3.8
conda activate testenv
pip install pfrl

Then:

python
>>> import pfrl

The error should be:

ImportError: cannot import name 'Monitor' from 'gym.wrappers' (/Users/prabhat/miniconda3/envs/testenv/lib/python3.8/site-packages/gym/wrappers/__init__.py)

I think the problem is simply that Monitor is not supported in the latest gym, but pfrl does not constrain the latest gym version. I think the longer-term solution is here: https://github.com/openai/gym/issues/2674#issuecomment-1064121293

muupan commented 1 year ago

Thanks for raising the issue. pfrl==0.4.0 has been released, which should solve it.