如何在Anaconda python中导入OpenGL? [英] How can i import OpenGL in anaconda python?
问题描述
我在anaconda python上使用ipython笔记本,但是我不知道如何安装或导入opengl. 谁能帮我解决这个问题? 我在Linux xubuntu上使用anaconda.对不起,英语不好.
I use ipython notebook on anaconda python but i have no idea how to install or import opengl. Can anyone help me solve this ? I use anaconda on linux xubuntu. Sorry for bad english.
推荐答案
正如David指出的那样,Vispy为OpenGL ES 2.0提供了OpenGL绑定.关于vispy的更有趣的是vispy.gloo
,它提供了一种更简单(面向对象)的OpenGL使用方式.
As pointed out by David, Vispy provides OpenGL bindings for OpenGL ES 2.0. More interesting about vispy is vispy.gloo
which provides a much easier (object oriented) way to use OpenGL.
如果您需要完整的桌面OpenGL功能(不限于ES 2.0),则需要PyOpenGL.我认为目前支持(至少在Linux上).这对我有用:
If you need full desktop OpenGL functionality (not limited to ES 2.0), you need PyOpenGL. I think that currently it is supported (at least on Linux). This works for me:
conda install pyopengl
或者,pip也应该起作用:
Alternatively, pip should work as well:
pip install pyopengl
这篇关于如何在Anaconda python中导入OpenGL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!