Problem using/installing numarray

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • maxwell@ldc.upenn.edu

    #1

    Problem using/installing numarray

    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\li b\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:
    [color=blue]
    > gcc -l/lib/python2.4[/color]

    /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

  • Fredrik Lundh

    #2
    Re: Problem using/installing numarray

    <maxwell@ldc.up enn.edu> wrote:
    [color=blue]
    > 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...)[/color]

    you can use imp.get_suffixe s() to get a list of supported extensions.
    here's the output from a stock python.org stock interpreter on WinXP:
    [color=blue][color=green][color=darkred]
    >>> import imp
    >>> imp.get_suffixe s()[/color][/color][/color]
    [('.pyd', 'rb', 3), ('.dll', 'rb', 3), ('.py', 'U', 1), ('.pyw', 'U', 1), ('.pyc', 'rb', 2)]

    </F>



    Comment

    • maxwell@ldc.upenn.edu

      #3
      Re: Problem using/installing numarray

      Thanks, that explains why the CygWin Python will not import the .pyd
      files:
      [color=blue][color=green][color=darkred]
      >>> imp.get_suffixe s()[/color][/color][/color]
      [('.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...

      Comment

      Working...