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.
相关问题
- Is shmid returned by shmget() unique across proces
- how to get running process information in java?
- Flush single app django 1.9
- Error building gcc 4.8.3 from source: libstdc++.so
- How to deploy python flask application in conda ba
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:
Alternatively, pip should work as well:
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.
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.
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.