_opengl mystery
Thomas A. Bryan
tbryan at python.net
Thu Feb 3 22:04:06 EST 2000
aya wrote:
> About 1 hour ago I took a look at Python for the first time. I installed
> all the binaries and modules
You didn't really need all of them unless you have something specific in
mind that requires them. :)
> So. my question is:
>
> 1) Why would this module import another module that doesn't exist?
Just a guess, but image operations would be much faster if they could
rely on the Numeric python extension. Since that extension is non-standard,
the implementor of the OpenGL stuff only uses it if its available.
> 2) Where can I get these modules (either the numeric or the _opengl). I
> have installed
> python-doc-html-1.5.2-1.noarch.rpm
> python-opengl-1.5.5-2.i386.rpm
> python-imaging-1.0b1-3.i386.rpm
> python-tkinter-1.5.2-2.i386.rpm
> python-imaging-_tkinter-1.0b1-3.i386.rpm
> and all the supporting libs, but none of these have _opengl in them
Um...python-opengl-1.5.5-2.i386.rpm, I would guess. See below, but
beware that I don't actually use Python's OpenGL stuff. I've simply
done one too many Python installations. ;)
> 3) Am I correct in assuming that the file in question is called
> "_opengl.py"?
Probably not. I suspect that it's actually looking for _openglmodule.so
Of course, that doesn't explain why you're seeing that particular error.
> When I do a 'locate _opengl' all I get is
>
> /usr/lib/python1.5/site-packages/OpenGL/shared/linux2/_opengl_nummodule.so
> /usr/lib/python1.5/site-packages/OpenGL/shared/linux2/_openglmodule.so
which you already have.
> 4) is that _opengl_nummodule.so the numeric module for python?
It looks like it is an OpenGL implementation that relies on the
Numeric Python extension. Install at least python-numpy-1.11-2 if
you want the OpenGL stuff to use _opengl_nummodule.so and (presumably)
run faster.
> If so, why does "if OpenGL._numeric:" fail in the file
> "/usr/lib/python1.5/site-packages/OpenGL/GL/__init__.py"?
_numeric is set in /usr/lib/python1.5/site-packages/OpenGL/__init__.py
based on whether multiarray is available. multiarray is part of the
python-numpy-1.11-2 RPM.
> Thank in advance for putting up these newbie questions
since-when-did-newbies-START-with-opengl?-ly yours
---Tom
More information about the Python-list
mailing list