How can I import OpenGL into anaconda python?

I am using ipython notebook on anaconda python, but I have no idea how to install or import opengl. Can anyone help me solve this problem? I am using anaconda on linux xubuntu. Sorry for the bad english.

+3


source to share


3 answers


As David pointed out, Vispy provides OpenGL bindings for OpenGL ES 2.0. What's more interesting about vispy is vispy.gloo

that it provides a much simpler (object oriented) way to use OpenGL.

If you want full OpenGL functionality on your desktop (not limited to ES 2.0), you need PyOpenGL. I think it is currently supported (at least on Linux). This works for me:

conda install pyopengl

      



Alternatively, the protocol should work as well:

pip install pyopengl

      

+5


source


From anaconda, you can install Vispy , which is an OpenGL multitasking rendering environment that comes with a set of OpenGL ES 2.0 bindings through vispy.gloo.gl .

pip install vispy

from vispy.gloo.gl import *

      

Vispy uses anaconda PyQt4 for QtOpenGL context. There are many good examples on the github repository that show its potential beyond providing OpenGL bindings.



Pyglet also offers a fairly complete set of OpenGL Python bindings.

pip install pyglet

>> from pyglet.gl import *

      

+4


source


I am assuming you are using anaconda on Windows ... Following the discussion on G Groups, there is currently (September 2013) no time frame set for including PyOpenGL in the anaconda package. However, it should be possible to use binaries from Chris Gohlke 's site .

0


source







All Articles