Problem using/installing numarray

Discussion in 'Python' started by maxwell@ldc.upenn.edu, Feb 17, 2005.

  1. Guest

    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
    , Feb 17, 2005
    #1
    1. Advertising

  2. <> 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>
    Fredrik Lundh, Feb 17, 2005
    #2
    1. Advertising

  3. Guest

    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...
    , Feb 17, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. RJS
    Replies:
    0
    Views:
    455
  2. Jim Cser
    Replies:
    5
    Views:
    306
    Jim Cser
    Aug 17, 2004
  3. Sonium

    Problems using numarray

    Sonium, Nov 3, 2004, in forum: Python
    Replies:
    2
    Views:
    246
  4. Colin J. Williams

    Problem with Help when using numarray

    Colin J. Williams, Sep 16, 2005, in forum: Python
    Replies:
    3
    Views:
    298
    Colin J. Williams
    Sep 16, 2005
  5. Replies:
    0
    Views:
    264
Loading...

Share This Page