[Numpy-discussion] F2PY error with G95 on Mac OS 10.5

David Cournapeau cournape@gmail....
Wed Jun 10 20:32:40 CDT 2009


On Thu, Jun 11, 2009 at 5:04 AM, Samir Unni<srunni@gmail.com> wrote:
> On Wed, Jun 10, 2009 at 2:59 PM, Adam Mercer<ramercer@gmail.com> wrote:
>> On Wed, Jun 10, 2009 at 12:44, Samir Unni<srunni@gmail.com> wrote:
>>
>>> I'm trying to use F2PY on Mac OS 10.5 with G95, but I'm getting the
>>> error "g95: unrecognized option '-shared'". I tried modifying the
>>> NumPy code to use the correct "-dynamic" flag, rather than the
>>> "-shared" flag. While that does allow for F2PY to successfully
>>> execute, I get the error
>>>
>>> Traceback (most recent call last):
>>>  File "<stdin>", line 1, in <module>
>>> ImportError: dlopen(/Users/srunni/src/pdb2pqr/pdb2pqr/tinker/src/tinker/source/ese.so,
>>> 2): no suitable image found.  Did find:
>>>        /Users/srunni/src/pdb2pqr/pdb2pqr/tinker/src/tinker/source/ese.so:
>>> unknown file type, first eight bytes: 0x80 0xC0 0x4F 0x00 0xEB 0x57
>>> 0xE0 0x8F
>>>
>>> when I attempt to import the generated module. Any ideas on how to fix this?
>>
>> AFAIK g95 is not supported by numpy distutils on Mac OS X.

No it is not, at least not in your configuration: g95 cannot build
universal binaries, and I think the OP error is caused by this.
Gfortran is certainly supported.

I don't know about fink and darwin ports, but the gfortran compiler available at

http://r.research.att.com/tools/

is the recommended one.

David


More information about the Numpy-discussion mailing list