rlworkgroup / garage

A toolkit for reproducible reinforcement learning research.
MIT License
1.86k stars 309 forks source link

Cannot import GymEnv #2209

Closed anahrendra closed 3 years ago

anahrendra commented 3 years ago

I tried to run an example code from the documentation, e.g., DDPG. However, I got the following error ImportError: cannot import name 'GymEnv' from 'garage.envs'

Do you have any idea about this? The installation is done successfully, and i can import garage already. Thanks!

ryanjulian commented 3 years ago

GymEnv was introduced after the 2020.06 release (which is what is available on PyPI), whereas the documentation covers what is on the master branch in GitHub.

To use the example from the documentation, you can install from GitHub.

Alternatively, you can view the examples as-of the 2020.06 API here: https://github.com/rlworkgroup/garage/tree/v2020.06.3/examples

jackwilkinson255 commented 3 years ago

I am having the same issue. I have cloned the master but am getting: ImportError: cannot import name 'GymEnv' when I run the example step_bullet_kuka_env.py

I'd like to get this example working as I'm using pybullet in my application.

Currently I have installed using setup.py and the extras for gym and bullet

Thanks

jackwilkinson255 commented 3 years ago

Doing pip install . inside the repo solved the issue as in #[2187]