Closed danwong closed 7 years ago
How did you install gym?
I used sudo pip install -e .
You must have another file called gym.py
or directory called gym
which Python is finding instead of the installed gym. You can find out what Python is loading with
$ python
>>> import gym
>>> gym.__file__
Right now, I'm trying to just get universe to work. But when importing universe, I get this error.
Traceback (most recent call last):
File "
I was able to get gym to import correctly now though.
I think this issue is the same as https://github.com/openai/universe/issues/139 for universe. Not sure how to fix it 😨
I think the problem was that you used sudo install -e You should not use sudo with install -e
I think that a py file named gym.py may be created in your workspace, this will conflict with gym package.
I think you should run the 'gym.make' command in the gym directory. Try run 'cd gym' to change current directory and problem can be solved. Or you can add 'export PYTHONPATH=your installed gym directory: $PYTHONPATH' at the end of your ~/.bashrc file.
I meet the same problem,can you tell me how do you solve this problem?
`import gym import universe # register the universe environments
env = gym.make('flashgames.DuskDrive-v0')
env.configure(remotes=1) # automatically creates a local docker container
observation_n = env.reset()
while True: action_n = [[('KeyEvent', 'ArrowUp', True)] for ob in observation_n] # your agent here observation_n, reward_n, done_n, info = env.step(action_n) env.render()` My current directory consists of a demo.py file readme, cloned gym, and cloned universe. I am just trying to run the sample code but I am getting this error.
File "demo.py", line 3, in
env = gym.make('flashgames.DuskDrive-v0')
AttributeError: module 'gym' has no attribute 'make'
Not sure what to do to fix this. I was just trying to verify that I set up the dependencies correctly.