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

Samir Unni srunni at gmail.com
Wed Jun 10 16:04:14 EDT 2009

On Wed, Jun 10, 2009 at 2:59 PM, Adam Mercer<ramercer at gmail.com> wrote:
> On Wed, Jun 10, 2009 at 12:44, Samir Unni<srunni at 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.

Are you sure? When I run "f2py -c --help-fcompiler", I get:

List of available Fortran compilers:
  --fcompiler=g95  G95 Fortran Compiler (0.91)

G95 is the only compiler listed as available. If it can't be used,
then what can? I would actually prefer to use GFortran, but that is
not listed as available.



More information about the NumPy-Discussion mailing list