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   Angry_Panda  阅读(328)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 周边上新:园子的第一款马克杯温暖上架
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
· DeepSeek如何颠覆传统软件测试?测试工程师会被淘汰吗?
· 使用C#创建一个MCP客户端
历史上的今天:
2021-03-28 Ax = b 的迭代解法 —— 共轭梯度 (算法步骤)
2019-03-28 【转载】 【caffe转向pytorch】caffe的BN层+scale层=pytorch的BN层
2019-03-28 【转载】 OpenCV ——双线性插值(Bilinear interpolation)
2018-03-28 Failed to resolve: com.android.support:appcompat-v7:27.+ 报错解决方法

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示