Question

I'm trying to install matplotlib on my mac setup. I find that setup.py has inaccurate flags, in particular the isysroot points to an earlier SDK.

Where does setup.py get its info and how can i fix it?

I'm on MacOS 10.5.8, XCode 3.1.2 and Python 2.6 (default config was 2.5)

Was it helpful?

Solution

I'm guessing you've installed 2.6 on 10.5 using the python.org OS X installer. In that case, the flags are accurate and you should not try to change them. The python.org installers are built using the so-called 10.4u SDK and with a deployment target of 10.3, allowing one installer image to work on Mac OS X systems from 10.3.9 up through 10.6 (and possibly beyond). The most recent releases of Python 2.6 have been fixed to ensure that extension module building on OS X forces the C compiler options to match those of the underlying Python so you'll need to make sure you install the 10.4u SDK (or whatever) if necessary from the Xcode package (on the OS X release CD/DVD or downloaded from the Apple Developer Connection website). It will also make sure you are using gcc-4.0, which is also the default on 10.5.

OTHER TIPS

setup.py gets its info from your installation of Python, specifically the distutils package of the standard library, from which it imports at least some functionality.

distutils.ccompiler provides the abstract base class CCompiler describing your C compiler. For gcc, the typical concrete class is in distutils.unixcompiler and I think that's where you should start checking for the Mac in particular.

If it can help you to see how things are in a perfectly working Mac OS X 10.5 with the next-but-latest XCode (I can't install the latest one as it's 10.6-only) I'll be glad to share info about my installation -- but I think it would be more helpful if you told us about what Mac OS X release, what XCode release, etc etc, you have installed!-)

It's also important to know whether you're using the system-provided Python, a macports one, one installed from python.org (and, which one;-), and so forth -- each may have its own installation problems of course, but they'll tend to be different from each other!-)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top