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

cannot import name 'FlattenDictWrapper' from 'gym.wrappers' #2

Open
Anjanitnov opened this issue Feb 2, 2023 · 0 comments
Open

cannot import name 'FlattenDictWrapper' from 'gym.wrappers' #2

Anjanitnov opened this issue Feb 2, 2023 · 0 comments

Comments

@Anjanitnov
Copy link

I am trying to use this code but after installing gym, baselines and other libraries with their latest versions, when I tried to run this program, it seemed that "baselines" is using "FlattenDictWrapper" from "gym.wrappers" where it is not able to find it in latest version. I tried switching to some older versions of gym and baselines but not able to resolve it. Can anyone guide into this.

Error: While importing 'run', an ImportError was raised:

Traceback (most recent call last):
File "C:\Data\Projects\venv\lib\site-packages\flask\cli.py", line 260, in locate_app
import(module_name)
File "C:\Users\common\Downloads\Deep-Reinforcement-Learning-for-Stock-Trading-DDPG-Algorithm-NIPS-2018-master\run.py", line 10, in
from baselines.common.cmd_util import common_arg_parser, parse_unknown_args, make_vec_env
File "C:\Data\Projects\venv\lib\site-packages\baselines\common\cmd_util.py", line 7, in
from gym.wrappers import FlattenDictWrapper
ImportError: cannot import name 'FlattenDictWrapper' from 'gym.wrappers' (C:\Users\common\Downloads\Deep-Reinforcement-Learning-for-Stock-Trading-DDPG-Algorithm-NIPS-2018-master\gym\wrappers_init_.py)

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

1 participant