# f2py on Mac OS Lion

I use sage both on an iMac running MacOS 10.5 (Leopard) and on a Laptop running 10.7 (Lion). For a while now, I've been trying to figure out how to get f2py work on the Lion laptop, with no success - it works without a problem on the Leopard iMac. A search throughs up some old tickets related to this, the most relevant probably being #8010 (http://trac.sagemath.org/sage_trac/ti...). It is a closed ticket, so I was hoping this problem would eventually be solved by an update, but as of 5.0.1 it is still there. Can anyone help me/point me to the right solution. The ticket talks about a "pach". Is this still relevant/up-to-date. If yes can anyone tell me how to apply it, please? Thanks!

Did you look at ticket #7465, does the code snippet there work for you? What version of Sage are you using?

Yes, that's essentially the same ticket and the same "patch". What I don't know is whether this is compatible with the current sage version (5.0.1, I've also still got a copy of version 4.7 if that makes any difference) and how to use it. Can you help? Thanks!

Can you post a small reproducible example? Does the code snippet in the ticket description at #7465 give you an error (the fortran code right below "Try this in a notebook cell on OS X:")

Yes, it does. The error message is too long to post in full, but I include the first line below. Does this help? error: Command "/Applications/Sage-5.0.1-OSX-64bit-10.6.app/Contents/Resources/sage/local/bin/sage-g77_shared -Wall /var/folders/k2/2wdbr5cx6n799_mbqmzf3_z40000gn/T/tmpw6dWEV/var/folders/k2/2wdbr5cx6n799_mbqmzf3_z40000gn/T/tmpw6dWEV/src.macosx-10.6-x86_64-2.7/fortran_module_0module.o /var/folders/k2/2wdbr5cx6n799_mbqmzf3_z40000gn/T/tmpw6dWEV/var/folders/k2/2wdbr5cx6n799_mbqmzf3_z40000gn/T/tmpw6dWEV/src.macosx-10.6-x86_64-2.7/fortranobject.o /var/folders/k2/2wdbr5cx6n799_mbqmzf3_z40000gn/T/tmpw6dWEV/Users/Tom/.sage/temp/Thomas_Stechers_MacBook_Air.local/311/tmp_0.o -L"Using built-in specs.