[Tutor] Utter newbie question

dman dsh8290@rit.edu
Sun, 6 Jan 2002 21:28:20 -0500


On Mon, Jan 07, 2002 at 02:15:59PM +1300, Willem de Beer wrote:
| Good day
| 
| I am using a laptop with Windows 98. I have a script into which I
| have imported Numeric.py. If I run it from the MS-DOS prompt, I get
| the error message 
| 
| File "C:\PYTHON21\Numeric\Numeric.py", line 80 in ?
| ImportError: DLL load failed: One of the library files needed to run this application cannot be found
 
There's more to this error message.  What does line 80 look like?  I
bet it is an import statement that loads the other part of the
package.

| This always happens at line 80 (even if I change line spacings etc.
| in Numeric.py), but does not happen when I run the script in the
| interactive window.

Numeric is a C (or C++, not sure) extension to python.  It has a
python wrapper module to provide a nice interface for python programs.
You will need both parts for it to function.  

Where/How did you install Numeric?  What is sys.path?  Where is the
dll it is looking for?  On my (debian) system it is one of

/usr/lib/python2.1/site-packages/Numeric/_numpy.so
/usr/lib/python2.1/site-packages/Numeric/multiarray.so
/usr/lib/python2.1/site-packages/Numeric/umath.so
/usr/lib/python2.1/site-packages/Numeric/arrayfns.so

(.so in unix is similar to .dll in windows)

Line 80 in my version of Numeric.py is the end of the module's
docstring.

Possibly the numeric installer told windows to include it in
%PYTHONPATH%, thus when python is run in windows it finds the
%libraries, but in DOS it doesn't.

-D

-- 

Do not be afraid of those who kill the body but cannot kill the soul.
Rather be afraid of the One who can destroy both soul and body in hell.
        Matthew 10:28