在opengym中导入“ Humanoid-V2”时出错

时间:2019-02-01 10:07:38

标签: python python-3.x python-2.7 openai-gym

从opengym库导入“ Humanoid-V2”时遇到问题。

有人可以帮我吗?

错误消息:

>>> env = gym.make('Humanoid-v2')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/abhilash/.local/lib/python2.7/site-packages/gym/envs/registration.py", line 167, in make
    return registry.make(id)
  File "/home/abhilash/.local/lib/python2.7/site-packages/gym/envs/registration.py", line 119, in make
    env = spec.make()
  File "/home/abhilash/.local/lib/python2.7/site-packages/gym/envs/registration.py", line 85, in make
    cls = load(self._entry_point)
  File "/home/abhilash/.local/lib/python2.7/site-packages/gym/envs/registration.py", line 14, in load
    result = entry_point.load(False)
  File "/home/abhilash/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2346, in load
    return self.resolve()
  File "/home/abhilash/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2352, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/abhilash/.local/lib/python2.7/site-packages/gym/envs/mujoco/__init__.py", line 1, in <module>
    from gym.envs.mujoco.mujoco_env import MujocoEnv
  File "/home/abhilash/.local/lib/python2.7/site-packages/gym/envs/mujoco/mujoco_env.py", line 11, in <module>
    import mujoco_py
  File "/home/abhilash/gym/mujoco-py/mujoco_py/__init__.py", line 3, in <module>
    from mujoco_py.builder import cymj, ignore_mujoco_warnings, functions, MujocoException
  File "/home/abhilash/gym/mujoco-py/mujoco_py/builder.py", line 495
    print(MISSING_KEY_MESSAGE.format(key_path), file=sys.stderr)
                                                    ^
SyntaxError: invalid syntax

我该如何解决?

谢谢!

0 个答案:

没有答案