[Pythonmac-SIG] libpython2.4 for OS X?

Bob Ippolito bob at redivi.com
Sat Apr 8 00:39:17 CEST 2006


On Apr 7, 2006, at 3:24 PM, Tom Loredo wrote:

> I'm introducing a colleague of mine to Python.  He heavily uses R,
> and so is interested in using the RPy (R from Python) and RSPython
> (R-Python bidirectional bridge) packages.  We have RPy working,
> with plots displayed via X11; the quartz interface suffers the
> spinning ball problem, even when it's run with pythonw.
>
> The challenge is RSPython.  The install fails at ./configure
> because it can't find a libpython2.4 library anywhere.  I've
> looked for one in the usual places (/usr/lib, /usr/local/lib,
> Python.framework), but can't find one.  Is there one lurking
> somewhere that I'm overlooking?  If one is not in MacPython,
> is there a good reason (i.e., a reason it wouldn't be useful),
> or is there a way we can build one?

Frameworks are dynamic libraries (technically MH_DYLIB on OS X), but  
they do not follow the same naming scheme, so they're not going to  
get picked up by a typical dumb configure-search.

If you wanted, you could make something look like the appropriate dylib:

% sudo ln -s ../Python /Library/Frameworks/Python.framework/Versions/ 
Current/lib/libpython2.4.dylib

Then you'd add Python's lib and include dir to that path.

Really the right way to link to Python is to ask it how via distutils  
(or reading the Makefile directly), not to hunt down libpython and  
whatnot.  Software that thinks it knows how to do it manually almost  
always gets it wrong on at least some platforms.

-bob



More information about the Pythonmac-SIG mailing list