Installing PyOpenGL - can't find libnumarray module

S

Steven Gutstein

This is probably a fairly newbie type problem, but I'm trying to use
PyOpenGL, and don't seem to have installed it correctly.

I'm running Python 2.3 on a Windows NT machine. Whenever I go into IDLE and
type

from OpenGL.GL import *

I get a flagrant crash which shuts down IDLE.

The error message I get (as well as I could copy it) is as follows:

Traceback (most recent call last):

File
"C:\Python23\lib\site-packages\Pythonwin\pywin\scintilla\formatter.py", line
222, in

OnStyleNeeded

notify = self.scintilla.SCIUnpackNotifyMessage(extra)

File "C:\Python23\lib\site-packages\Pythonwin\pywin\scintilla\control.py"
, line 57, in

SCIUnpackNotifyMessage

margin = margin)

ImportError: No module named libnumarray

win32ui: Exception in OnNotify() handler



The main problem seems to be the lack of a libnumarray module. However,

I have already installed numarray, and have verified that it's in my
sys.path:



['', 'c:\\dislin\\python', 'C:\\WINDOWS\\System32\\python23.zip',
'C:\\Python23\\lib\\site-packages\\Pythonwin',
'C:\\Python23\\lib\\site-packages\\win32',
'C:\\Python23\\lib\\site-packages\\win32\\lib',
'C:\\Python23\\lib\\site-packages', 'C:\\Python23\\DLLs',
'C:\\Python23\\lib', 'C:\\Python23\\lib\\plat-win',
'C:\\Python23\\lib\\lib-tk', 'C:\\Python23',
'C:\\Python23\\Deitel_Examples',
'C:\\Python23\\lib\\site-packages\\Numeric',
'C:\\Python23\\lib\\site-packages\\PIL',
'C:\\Python23\\lib\\site-packages\\gist',
'C:\\Python23\\lib\\site-packages\\numarray',
'C:\\Python23\\lib\\site-packages\\PythonPrograms']



It's the next to last entry.



Inside my numarray directory there is a file libnumarray.pyd.



I reinstalled numarray & checked the version for Python2.2. All I see in
each version is libnumarray.pyd.



Is there anything obvious that I'm missing or should try ?



Thanks,



Steven Gutstein
 
M

Mike C. Fletcher

Steven said:
This is probably a fairly newbie type problem, but I'm trying to use
PyOpenGL, and don't seem to have installed it correctly.

....

ImportError: No module named libnumarray

....

The main problem seems to be the lack of a libnumarray module. However,

I have already installed numarray, and have verified that it's in my
sys.path:
Well, if you format this somewhat differently, yes, it's the problem.
PyOpenGL currently requires NumPy (as distinct from NumArray). I
haven't had the time to track down what's broken in the
PyOpenGL/NumArray interface (I gather NumArray is supposed to be
compatible with NumPy at some level, as it gets to the point of crashing
when people attempt to use this setup, but I don't know whether that's
supposed to be a binary compatibility or not).

Basically, to fix the problem, uninstall NumArray and install NumPy 23.0.

HTH,
Mike

_______________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://members.rogers.com/mcfletch/
 
S

Steven Gutstein

Mike C. Fletcher said:
Basically, to fix the problem, uninstall NumArray and install NumPy 23.0.

I tried this, without success.
I also find I get the same error when I type

from numarray import *

I'm wondering if there's some problem with the fact that libnumarray
is a .pyd file. I came across a comment that for some reason .pyd
files don't get found and what I should do is create the following
setup.cfg file:

<setup.cfg>
[py2exe]
includes=numarray.libnumarray,
numarray.memory,
numarray._bytes,
numarray._chararray,
numarray._conv,
numarray._converter,
numarray._ndarray,
numarray._numarray,
numarray._operator,
numarray._sort,
numarray._ufunc,
numarray._ufuncBool,
numarray._ufuncComplex32,
numarray._ufuncComplex64,
numarray._ufuncFloat32,
numarray._ufuncFloat64,
numarray._ufuncInt16,
numarray._ufuncInt32,
numarray._ufuncInt64,
numarray._ufuncInt8,
numarray._ufuncUInt16,
numarray._ufuncUInt32,
numarray._ufuncUInt8
</setup.cfg>

This file was supposed to be placed in the same directory as setup.py.

The only reasonable setup.py I found was in c:\python23\Tools\scripts.
However, my setup.cfg file still didn't work. Is there something
obvious that I'm missing here ?
 
M

Mike C. Fletcher

Steven said:
I tried this, without success.
I also find I get the same error when I type

from numarray import *
You are trying to import a package you just un-installed? Is this line
showing up from some other package you're trying to run and you're
debugging by trying it at the Python prompt? A Numpy import looks like
this:

from Numeric import *

AFAICS, there's nothing named numarray anywhere in a Numpy 23.0
installation, so if you get that working, then you've not got NumArray
purged yet.

However, since your original problem was an import error, "the same
error" probably (posting exception tracebacks is useful) indicates that
you're getting an ImportError saying that numarray doesn't exist.
That's what you *want* (since you don't want NumArray hanging around).
I'm wondering if there's some problem with the fact that libnumarray
is a .pyd file. I came across a comment that for some reason .pyd
files don't get found and what I should do is create the following
setup.cfg file:
<lot of py2exe setup stuff snipped>

This is only for creating stand-alone executables, it has nothing to do
with just running PyOpenGL. It's also related to NumArray, *not* Numpy,
so again, not relevant.
Is there something
obvious that I'm missing here ?
Hopefully not any more.

Good luck,
Mike

_______________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://members.rogers.com/mcfletch/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,783
Latest member
RickeyDort

Latest Threads

Top