0

I am using openAI gym on windows 10 x64, with python 3.6.7 through windows remote desktop and i succeeded in installing atari-py and mujoco-py, but when i tried running this code.

import gym

env = gym.make('Humanoid-v2')

for i_episode in range(100):
    env.reset()
    for t in range(100):
        env.render()
        action = env.action_space.sample()
        observation, reward, done, info = env.step(action)
        if done:
            print("Episode finished after {} timesteps".format(t+1))
            break

I got this error:

GLFW error (code %d): %s 65544 b'Vulkan: Failed to query instance extension count: The requested version of Vulkan is not supported by the driver or is otherwise incompatible'
Creating window glfw
GLFW error (code %d): %s 65542 b'WGL: The driver does not appear to support OpenGL'
Traceback (most recent call last):
  File "test.py", line 7, in <module>
    env.render()
  File "D:\ReinforceLearning\RLenv\lib\site-packages\gym\core.py", line 275, in render
    return self.env.render(mode, **kwargs)
  File "D:\ReinforceLearning\RLenv\lib\site-packages\gym\envs\mujoco\mujoco_env.py", line 118, in render
    self._get_viewer(mode).render()
  File "D:\ReinforceLearning\RLenv\lib\site-packages\gym\envs\mujoco\mujoco_env.py", line 130, in _get_viewer
    self.viewer = mujoco_py.MjViewer(self.sim)
  File "D:\ReinforceLearning\RLenv\lib\site-packages\mujoco_py-1.50.1.0-py3.6.egg\mujoco_py\mjviewer.py", line 130, in __init__
    super().__init__(sim)
  File "D:\ReinforceLearning\RLenv\lib\site-packages\mujoco_py-1.50.1.0-py3.6.egg\mujoco_py\mjviewer.py", line 25, in __init__
    super().__init__(sim)
  File "RLenv\lib\site-packages\mujoco_py-1.50.1.0-py3.6.egg\mujoco_py\mjrendercontext.pyx", line 244, in mujoco_py.cymj.MjRenderContextWindow.__init__
    super().__init__(sim, offscreen=False)
  File "RLenv\lib\site-packages\mujoco_py-1.50.1.0-py3.6.egg\mujoco_py\mjrendercontext.pyx", line 43, in mujoco_py.cymj.MjRenderContext.__init__
    self._setup_opengl_context(offscreen)
  File "RLenv\lib\site-packages\mujoco_py-1.50.1.0-py3.6.egg\mujoco_py\mjrendercontext.pyx", line 92, in mujoco_py.cymj.MjRenderContext._setup_opengl_context
    self._opengl_context = GlfwContext(offscreen=offscreen)
  File "RLenv\lib\site-packages\mujoco_py-1.50.1.0-py3.6.egg\mujoco_py\opengl_context.pyx", line 48, in mujoco_py.cymj.GlfwContext.__init__
    self.window = self._create_window(offscreen)
  File "RLenv\lib\site-packages\mujoco_py-1.50.1.0-py3.6.egg\mujoco_py\opengl_context.pyx", line 97, in mujoco_py.cymj.GlfwContext._create_window
    raise GlfwError("Failed to create GLFW window")
mujoco_py.cymj.GlfwError: Failed to create GLFW window
LuKa Chen
  • 33
  • 1
  • 6
  • `GLFW error (code %d): %s 65542 b'WGL: The driver does not appear to support OpenGL'` Check what exactly your graphics driver support. – Nadir Nov 09 '18 at 08:26
  • @Nadir, thanks bro. I have GTX 1070ti which support OpenGL upto 4.5, maybe it's due to the PyOpenGL package (3.1.0) only support upto OpenGL 4.4. – LuKa Chen Nov 14 '18 at 01:17

1 Answers1

0

OpenGL over WindowsRemote is not supported on NVIDIA GPUs for OpenGL Versions after 1.1. Did a writeup on what workaround exist: Current state and solutions for OpenGL over Windows Remote

For extra salt into the wound: You can launch the an opengl context and then connect via WindowsRemote. But launching inside the session directly is impossible without workarounds.

FrostKiwi
  • 741
  • 1
  • 6
  • 16