How to 'apt-get install python-opengl' on Ubuntu22.04
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>'

相关资料:
https://installati.one/install-python3-opengl-ubuntu-20-04/
===========================================
解决方法:
sudo apt-get -y install python3-opengl
在老版本的ubuntu中为python安装openGL支持的命令为:
sudo apt-get install python-opengl
但是在ubuntu20.04和ubuntu22.04中该命令为:
sudo apt-get install python3-opengl
===========================================
posted on 2023-03-28 21:30 Angry_Panda 阅读(397) 评论(0) 收藏 举报
浙公网安备 33010602011771号