Итак, после использования openaischatgpt и dall-e я использую тренажерный зал, и в моем коде возникла эта ошибка, та же самая ошибка, которая постоянно выскакивает (для справки, у меня есть Intel HD 3000, и там написано, что есть что-то, чего нет в моем OpenGL) поэтому код и ошибка — это
код (main.py):
import gym
import matplotlib.pyplot as plt
env = gym.make('MountainCar-v0')
# Observation and action space
obs_space = env.observation_space
action_space = env.action_space
print("The observation space: {}".format(obs_space))
print("The action space: {}".format(action_space))
# reset the environment and see the initial observation
obs = env.reset()
print("The initial observation is {}".format(obs))
# Sample a random action from the entire action space
random_action = env.action_space.sample()
# # Take the action and get the new observation space
new_obs, reward, done, info = env.step(random_action)
print("The new observation is {}".format(new_obs))
env.render(mode = "human")
Warning: Parameters to load are deprecated. Call .resolve and .require separately.
result = entry_point.load(False)
The observation space: Box(2,)
The action space: Discrete(3)
The initial observation is [-0.53907843 0. ]
The new observation is [-0.53996238 -0.00088394]
Traceback (most recent call last):
File "c:\Users\Acer\Desktop\game-bot\main.py", line 23, in
env.render(mode = "human")
File "C:\Users\Acer\AppData\Local\Programs\Python\Python310\lib\site-packages\gym\core.py", line 174, in render
return self._render(mode=mode, close=close)
File "C:\Users\Acer\AppData\Local\Programs\Python\Python310\lib\site-packages\gym\core.py", line 341, in _render
return self.env.render(mode, close)
File "C:\Users\Acer\AppData\Local\Programs\Python\Python310\lib\site-packages\gym\core.py", line 174, in render
return self._render(mode=mode, close=close)
File "C:\Users\Acer\AppData\Local\Programs\Python\Python310\lib\site-packages\gym\envs\classic_control\mountain_car.py", line 79, in _render
self.viewer = rendering.Viewer(screen_width, screen_height)
File "C:\Users\Acer\AppData\Local\Programs\Python\Python310\lib\site-packages\gym\envs\classic_control\rendering.py", line 51, in __init__
self.window = pyglet.window.Window(width=width, height=height, display=display)
File "C:\Users\Acer\AppData\Local\Programs\Python\Python310\lib\site-packages\pyglet\window\win32\__init__.py", line 104,
in __init__
super(Win32Window, self).__init__(*args, **kwargs)
File "C:\Users\Acer\AppData\Local\Programs\Python\Python310\lib\site-packages\pyglet\window\__init__.py", line 582, in __init__
self._create_projection()
File "C:\Users\Acer\AppData\Local\Programs\Python\Python310\lib\site-packages\pyglet\window\__init__.py", line 590, in _create_projection
shader.Shader(self._default_vertex_source, 'vertex'),
File "C:\Users\Acer\AppData\Local\Programs\Python\Python310\lib\site-packages\pyglet\graphics\shader.py", line 794, in __init__
shader_id = glCreateShader(shader_type)
File "C:\Users\Acer\AppData\Local\Programs\Python\Python310\lib\site-packages\pyglet\gl\lib_wgl.py", line 66, in __call__
return self.func(*args, **kwargs)
File "C:\Users\Acer\AppData\Local\Programs\Python\Python310\lib\site-packages\pyglet\gl\lib.py", line 25, in MissingFunction
raise MissingFunctionException(name, requires, suggestions)
pyglet.gl.lib.MissingFunctionException: glCreateShader is not exported by the available OpenGL driver. OpenGL 2.0 is required for this functionality.
Я пытался обновить opengl, но ошибка все та же. Я проверил все ответы, но все равно получил ту же ошибку.
Итак, после использования openaischatgpt и dall-e я использую тренажерный зал, и в моем коде возникла эта ошибка, та же самая ошибка, которая постоянно выскакивает (для справки, у меня есть Intel HD 3000, и там написано, что есть что-то, чего нет в моем OpenGL) поэтому код и ошибка — это код (main.py): [code]import gym import matplotlib.pyplot as plt
env = gym.make('MountainCar-v0')
# Observation and action space obs_space = env.observation_space action_space = env.action_space print("The observation space: {}".format(obs_space)) print("The action space: {}".format(action_space))
# reset the environment and see the initial observation obs = env.reset() print("The initial observation is {}".format(obs))
# Sample a random action from the entire action space random_action = env.action_space.sample()
# # Take the action and get the new observation space new_obs, reward, done, info = env.step(random_action) print("The new observation is {}".format(new_obs))
env.render(mode = "human") [/code] ошибка: [code]Warning: Parameters to load are deprecated. Call .resolve and .require separately. result = entry_point.load(False) The observation space: Box(2,) The action space: Discrete(3) The initial observation is [-0.53907843 0. ] The new observation is [-0.53996238 -0.00088394] Traceback (most recent call last): File "c:\Users\Acer\Desktop\game-bot\main.py", line 23, in env.render(mode = "human") File "C:\Users\Acer\AppData\Local\Programs\Python\Python310\lib\site-packages\gym\core.py", line 174, in render return self._render(mode=mode, close=close) File "C:\Users\Acer\AppData\Local\Programs\Python\Python310\lib\site-packages\gym\core.py", line 341, in _render return self.env.render(mode, close) File "C:\Users\Acer\AppData\Local\Programs\Python\Python310\lib\site-packages\gym\core.py", line 174, in render return self._render(mode=mode, close=close) File "C:\Users\Acer\AppData\Local\Programs\Python\Python310\lib\site-packages\gym\envs\classic_control\mountain_car.py", line 79, in _render self.viewer = rendering.Viewer(screen_width, screen_height) File "C:\Users\Acer\AppData\Local\Programs\Python\Python310\lib\site-packages\gym\envs\classic_control\rendering.py", line 51, in __init__ self.window = pyglet.window.Window(width=width, height=height, display=display) File "C:\Users\Acer\AppData\Local\Programs\Python\Python310\lib\site-packages\pyglet\window\win32\__init__.py", line 104, in __init__ super(Win32Window, self).__init__(*args, **kwargs) File "C:\Users\Acer\AppData\Local\Programs\Python\Python310\lib\site-packages\pyglet\window\__init__.py", line 582, in __init__ self._create_projection() File "C:\Users\Acer\AppData\Local\Programs\Python\Python310\lib\site-packages\pyglet\window\__init__.py", line 590, in _create_projection shader.Shader(self._default_vertex_source, 'vertex'), File "C:\Users\Acer\AppData\Local\Programs\Python\Python310\lib\site-packages\pyglet\graphics\shader.py", line 794, in __init__ shader_id = glCreateShader(shader_type) File "C:\Users\Acer\AppData\Local\Programs\Python\Python310\lib\site-packages\pyglet\gl\lib_wgl.py", line 66, in __call__ return self.func(*args, **kwargs) File "C:\Users\Acer\AppData\Local\Programs\Python\Python310\lib\site-packages\pyglet\gl\lib.py", line 25, in MissingFunction raise MissingFunctionException(name, requires, suggestions) pyglet.gl.lib.MissingFunctionException: glCreateShader is not exported by the available OpenGL driver. OpenGL 2.0 is required for this functionality. [/code] Я пытался обновить opengl, но ошибка все та же. Я проверил все ответы, но все равно получил ту же ошибку.