Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Problem using/installing numarray

Reply
Thread Tools

Problem using/installing numarray

 
 
maxwell@ldc.upenn.edu
Guest
Posts: n/a
 
      02-17-2005
I'm trying to use the 'numarray' package (v1.1.1) under Python 2.4
running under CygWin.

I initially downloaded the Windows executable version of the numarray
package, and installed it under C:\program
files\python\lib\site-packages. That works with the Windows version of
Python, but not the CygWin version, where it fails with the msg:
ImportError: No module named _conv
The file _conf.pyd exists, but my guess is that the .pyd suffix is not
recognized under the CygWin version of Python. (But that doesn't make
sense...)

So I decided to download the .tgv version of the numarray package into
/lib/site-packages (under my CygWin dir), and build it. Unfortunately,
the build fails with the msg:

building 'numarray._conv' extension
gcc -shared -Wl,--enable-auto-image-base \
build/temp.cygwin-1.5.12-i686-2.4/Src/_convmodule.o \
-L. -lpython2.4 -o \
build/lib.cygwin-1.5.12-i686-2.4/numarray/_conv.dll \
-L/lib -lm -lc -lgcc -L/lib/mingw -lmingwex

/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../../i686-pc-cygwin/bin/ld:
\
cannot find -lpython2.4
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

(I've tried to indicate the wrapped lines above by continuing them with
"\", but no guarantees this won't wrap again...)

At first I thought this was a problem with a path, but even hard coding
the path at the command line doesn't seem to work:

> gcc -l/lib/python2.4


/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../../i686-pc-cygwin/bin/ld:
\
cannot find -l/lib/python2.4

I have a _directory_ /lib/python2.4, but it sounds like gcc is looking
for some kind of library file.

Suggestions?

Mike Maxwell

 
Reply With Quote
 
 
 
 
Fredrik Lundh
Guest
Posts: n/a
 
      02-17-2005
<> wrote:

> ImportError: No module named _conv
> The file _conf.pyd exists, but my guess is that the .pyd suffix is not
> recognized under the CygWin version of Python. (But that doesn't make
> sense...)


you can use imp.get_suffixes() to get a list of supported extensions.
here's the output from a stock python.org stock interpreter on WinXP:

>>> import imp
>>> imp.get_suffixes()

[('.pyd', 'rb', 3), ('.dll', 'rb', 3), ('.py', 'U', 1), ('.pyw', 'U', 1), ('.pyc', 'rb', 2)]

</F>



 
Reply With Quote
 
 
 
 
maxwell@ldc.upenn.edu
Guest
Posts: n/a
 
      02-17-2005
Thanks, that explains why the CygWin Python will not import the .pyd
files:

>>> imp.get_suffixes()

[('.dll', 'rb', 3), ('module.dll', 'rb', 3), ('.py', 'U', 1), ('.pyc',
'rb', 2)]

Doesn't look like there's a way to get the CygWin Python to load .pyd
files. So I guess I have to figure out why the build isn't working...

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Help when using numarray Colin J. Williams Python 3 09-16-2005 07:36 PM
Connecting to numarray. Problem with the setup program Jean Moser Python 1 12-08-2004 11:03 PM
numarray + cPickle problem Bill Mill Python 5 11-14-2004 02:33 PM
Numarray install problem Bruce Wolk Python 0 02-24-2004 05:44 PM
problem w/ numarray & py2exe... RJS Python 0 07-01-2003 06:44 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57