I tried to install mujoco_py 0.5.7 with mojoco 131,and when i run gym.make('Humanoid-v2'),it yielded an error
> [2018-01-29 03:06:00,896] Making new env: Humanoid-v2
> Traceback (most recent call last):
> File "a.py", line 2, in <module>
> env = gym.make('Humanoid-v2')
> File "/home/gungui/.local/lib/python3.5/site-packages/gym/envs/registration.py", line 164, in make
> return registry.make(id)
> File "/home/gungui/.local/lib/python3.5/site-packages/gym/envs/registration.py", line 122, in make
> env = spec.make()
> File "/home/gungui/.local/lib/python3.5/site-packages/gym/envs/registration.py", line 89, in make
> env = cls(**self._kwargs)
> File "/home/gungui/.local/lib/python3.5/site-packages/gym/envs/mujoco/humanoid.py", line 12, in __init__
> mujoco_env.MujocoEnv.__init__(self, 'humanoid.xml', 5)
> File "/home/gungui/.local/lib/python3.5/site-packages/gym/envs/mujoco/mujoco_env.py", line 27, in __init__
> self.model = mujoco_py.load_model_from_path(fullpath)
> AttributeError: module 'mujoco_py' has no attribute 'load_model_from_path'
> Error in atexit._run_exitfuncs:
> Traceback (most recent call last):
> File "/home/gungui/.local/lib/python3.5/site-packages/gym/utils/closer.py", line 67, in close
> closeable.close()
> File "/home/gungui/.local/lib/python3.5/site-packages/gym/core.py", line 164, in close
> self.render(close=True)
> File "/home/gungui/.local/lib/python3.5/site-packages/gym/core.py", line 150, in render
> return self._render(mode=mode, close=close)
> File "/home/gungui/.local/lib/python3.5/site-packages/gym/envs/mujoco/mujoco_env.py", line 104, in _render
> if self.viewer is not None:
> AttributeError: 'HumanoidEnv' object has no attribute 'viewer'
> Exception ignored in: <bound method Env.__del__ of <gym.envs.mujoco.humanoid.HumanoidEnv object at 0x7fb71587a7f0>>
> Traceback (most recent call last):
> File "/home/gungui/.local/lib/python3.5/site-packages/gym/core.py", line 203, in __del__
> self.close()
> File "/home/gungui/.local/lib/python3.5/site-packages/gym/core.py", line 164, in close
> self.render(close=True)
> File "/home/gungui/.local/lib/python3.5/site-packages/gym/core.py", line 150, in render
> return self._render(mode=mode, close=close)
> File "/home/gungui/.local/lib/python3.5/site-packages/gym/envs/mujoco/mujoco_env.py", line 104, in _render
> if self.viewer is not None:
> AttributeError: 'HumanoidEnv' object has no attribute 'viewer'
>
the problem can be fixed by installing gym version 0.7.4!
pip3 uninstall gym
pip3 install gym==0.7.3
This works for me. Thanks @gungui98
Most helpful comment
the problem can be fixed by installing gym version 0.7.4!