[Numpy-discussion] f2py links extensions to incorrect python installation on OSX / Anaconda
ralf.gommers at gmail.com
Mon Apr 21 05:55:05 EDT 2014
On Thu, Mar 27, 2014 at 10:11 PM, Alex Goodman
<alex.goodman at colostate.edu>wrote:
> Hi Robert,
> That did the trick, thanks!
> On Thu, Mar 27, 2014 at 3:02 PM, Robert Kern <robert.kern at gmail.com>wrote:
>> On Thu, Mar 27, 2014 at 8:50 PM, David Cournapeau <cournape at gmail.com>
>> > On Thu, Mar 27, 2014 at 8:30 PM, Alex Goodman <
>> alex.goodman at colostate.edu>
>> > wrote:
>> >> Hi all,
>> >> I have used f2py in the past on a Linux machine with virtually no
>> >> However on my Mac, I get the following error when importing an f2py
>> >> generated extension:
>> >> Fatal Python error: PyThreadState_Get: no current thread
>> >> Abort trap: 6
>> >> After doing some research I found out that the extension is linked to
>> >> wrong python installation:
>> >> otool -L add.so
>> >> add.so:
>> >> ./add.so (compatibility version 0.0.0, current version 0.0.0)
>> >> /System/Library/Frameworks/Python.framework/Versions/2.7/Python
>> >> (compatibility version 2.7.0, current version 2.7.2)
>> >> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
>> >> 169.3.0)
>> >> This seems odd because I am using the f2py executable included in
>> >> 1.9.1. I can easily fix this problem by manually using
>> >> -change on the extension to link the correct library location, but
>> this is
>> >> really cumbersome. Is there an alternative solution, such as an
>> >> command-line argument when invoking f2py?
>> > This sounds like an issue specific to Anaconda, and you may get better
>> > support on the Anaconda support ML.
>> I think it's our bug. numpy.distutils adds an explicit `-framework
>> Python` in the Intel Fortran link line. We should be just be using
>> `-undefined dynamic_lookup`.
>> Alex, can you edit that file to remove the '-Wl,-framework,Python'
>> from that list and try building again?
Submitted a PR for this: https://github.com/numpy/numpy/pull/4630. Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion