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

What is the version of mujoco and gym that is required to run a baseline code? #625

Closed
NishanthVAnand opened this issue Sep 28, 2018 · 11 comments

Comments

@NishanthVAnand
Copy link

I currently have gym==0.9.3 and mujoco version at mujoco-py==0.5.7. I get error when I run the PPO code. Below is the error I get
from gym.wrappers import FlattenDictWrapper ImportError: cannot import name 'FlattenDictWrapper'

@pzhokhov
Copy link
Collaborator

Hi @NishanthVAnand! Thanks for pointing it out, we'll constrain the version of gym required by baselines. You'll need gym >= 0.10, and mujoco>=1.50 (I'd recommend installing the latest if you don't have a particular attachment to the old version)
pip install gym[mujoco] --update would pull latest gym and a correct version of mujoco with it.

@DongChen06
Copy link

does pip install gym[mujoco] --update mean pip install gym[0.5.7] --update, it fails.

@Muguangfeng
Copy link

Hi! Have you solved the problem? I made the similar mistake with you. I have update to gym0.12 and mujoco1.50, mujoco-py1.50.1.68, but it is still the problem.

@DongChen06
Copy link

DongChen06 commented Apr 26, 2019

@Muguangfeng I solved the problem, maybe you can have a try: [https://github.com/openai/mujoco-py/issues/244]

@Muguangfeng
Copy link

As you said: Using low version of gym, may cause prolem like: ImportError cannot import name FlattenDictWrapper
I have tried gym0.10.5、gym0.12 with mujoco131 or mujoco150, but it is still this problem. Shouldn't this error only be related to gym?
Do I still need to try mujoco 200? This is not what I want,because mujoco200 may require a different license with mujoco131 and mujoco150.

@DongChen06
Copy link

DongChen06 commented Apr 26, 2019 via email

@Muguangfeng
Copy link

Thanks,I will have a try.

@pzhokhov
Copy link
Collaborator

So that particular error, ImportError: cannot import name 'FlattenDictWrapper' on from gym.wrappers import FlattenDictWrapper occurs in the gym versions < 0.10.0. Any gym version >= 0.10.0 should work, including gym installed from master branch

@pzhokhov
Copy link
Collaborator

Gym version required for baselines is now contrained (#885). Closing this issue.

@Muguangfeng
Copy link

Hi! I installed gym0.10.5 by running pip install gym==0.10.5, but it is still the problem:ImportError cannot import name FlattenDictWrapper.
Does I need to run pip install gym[all].
If i do like this, it tell me that i need install mujoco200. I don't want to install mujoco200, because my another code requests mujoco131. Is there any solutions.

@DongChen06
Copy link

DongChen06 commented Apr 29, 2019 via email

mozammalchy pushed a commit to mozammalchy/baselines that referenced this issue Dec 20, 2019
* Bump version

* Add a message to PPO2 assert (closes openai#625)

* Update replay buffer doctring (closes openai#610)

* Don't specify a version for pytype

* Fix `VecEnv` docstrings (closes openai#577)

* Typo

* Re-add python version for pytype
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

No branches or pull requests

4 participants