[Numpy-discussion] F2PY error : ... on platform 'posix' with 'gcc' compiler

Arthur Bousquet arthbous@indiana....
Fri Sep 25 14:44:24 CDT 2009


$ file libsw.so gives :

libsw.so: Mach-O bundle i386

How can I change it ? Is it because of my gfortran ?

Thanks.

- Arthur

On Fri, Sep 25, 2009 at 3:30 PM, Robert Kern <robert.kern@gmail.com> wrote:

> On Fri, Sep 25, 2009 at 14:08, Arthur Bousquet <arthbous@indiana.edu>
> wrote:
> > Ok, so I re-compiled python (without framework), numpy,... So I can
> compile
> > my lib (libsw) now, bu I can't called it from python. I got this error :
> >
> > Arths-MacBook-Pro:run_1 arthbous$ ./run.sh
> > Traceback (most recent call last):
> >   File "../main.py", line 23, in <module>
> >     import libsw as lsw
> > ImportError: dlopen(/Users/arthbous/Documents/SW/sw-v2.3/libsw.so, 2): no
> > suitable image found.  Did find:
> >     /Users/arthbous/Documents/SW/sw-v2.3/libsw.so: mach-o, but wrong
> > architecture
> >
> > It seems to compile for the wrong architecture. Do you know about this ?
>
> Find the architecture of libsw.so using file:
>
> $ file /Users/arthbous/Documents/SW/sw-v2.3/libsw.so
>
> It is likely that it is only x86 while your Python is running using
> the x86_64 architecture.
>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless
> enigma that is made terrible by our own mad attempt to interpret it as
> though it had an underlying truth."
>  -- Umberto Eco
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090925/17c69225/attachment.html 


More information about the NumPy-Discussion mailing list