How Can I Import Opengl In Anaconda Python?
Solution 1:
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.
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
Alternatively, pip should work as well:
pip install pyopengl
Solution 2:
From anaconda, you can pip install Vispy, which is a numpy OpenGL data visualization framework that happens to provide a set of OpenGL ES 2.0 bindings via vispy.gloo.gl.
pip install vispy
from vispy.gloo.glimport *
Vispy uses anaconda's PyQt4 for the QtOpenGL context. The github repo has plenty of nice examples that show its potential beyond providing OpenGL bindings.
Pyglet also offers a fairly complete set of OpenGL Python bindings.
pip install pyglet
>> from pyglet.glimport *
Solution 3:
I assume you are using anaconda on Windows... Following the discussions on G Groups there is currently (Sept.2013) no time frame set for the inclusion of PyOpenGL in the anaconda package. However, it should be possible to use the binaries from Chris Gohlke's site.
Post a Comment for "How Can I Import Opengl In Anaconda Python?"