Problem using/installing numarray

M

maxwell

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
 
F

Fredrik Lundh

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:
[('.pyd', 'rb', 3), ('.dll', 'rb', 3), ('.py', 'U', 1), ('.pyw', 'U', 1), ('.pyc', 'rb', 2)]

</F>
 
M

maxwell

Thanks, that explains why the CygWin Python will not import the .pyd
files:
[('.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...
 

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
474,263
Messages
2,571,064
Members
48,769
Latest member
Clifft

Latest Threads

Top