-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
ImportError: cannot import name 'FlattenObservation' #1058
Comments
I got the same error, you can fix it by installing 0.15.4: |
I'm getting the same issue and my gym version is 0.15.4... any other recommended fixes? |
I am also getting the same issue with 0.15.4. Any help? |
So I'm not sure if this is the answer, but upon looking into the gym/gym/wrappers, folder, it looks like there are only files named "flatten_ovservation" and "filter_observation" so I just chose to import the entire wrappers folder with: from gym import wrappers in the cmd_util.py file to get beyond this error. Of course now I get a new error though: |
9ee399f |
So what if we have 0.15.4 already? go even earlier? |
I was finally able to get it to work, though with gym 0.15.3 not 0.15.4. Also, I had to remove two underscores in the run.py. |
After I installed it according to the requirements, I got an ImportError: cannot import name 'FlattenObservation' error. I know that it is the version of the gym package or something went wrong elsewhere. Thanks for the help!
File "/home/xxx/baselines/baselines/run.py", line 12, in
from baselines.common.cmd_util import common_arg_parser, parse_unknown_args, make_vec_env, make_env
File "/home/xxx/baselines/baselines/common/cmd_util.py", line 12, in
from gym.wrappers import FlattenObservation, FilterObservation
ImportError: cannot import name 'FlattenObservation'
The text was updated successfully, but these errors were encountered: