我正在使用 Mac,并尝试从 open ai 的健身房渲染环境
import gym
env= gym.make('CartPole-v1')
img = env.render()
ImportError: Can't find framework /System/Library/Frameworks/OpenGL.framework.
During handling of the above exception, another exception occurred:
ImportError:
Error occurred while running `from pyglet.gl import *`
HINT: make sure you have OpenGL install. On Ubuntu, you can run 'apt-get install python-opengl'.
If you're running on a server, you may need a virtual frame buffer; something like this should work:
'xvfb-run -s "-screen 0 1400x900x24" python <your_script.py>'
尽管事实上,当我导航到该目录(Framewords)时,我可以直接看到 OpenGL.framework
有人遇到过这个吗?
正如线程中指出的,尝试:
pip install pyglet==1.5.11