Home > general, science > Building matplotlib on Mac OS snow leopard

Building matplotlib on Mac OS snow leopard

November 19th, 2010 alex Leave a comment Go to comments

I spent a lot of time trying to figure out how to build matplotlib on Snow Leopard without using macports – I prefer to use homebrew instead and ended up with incompatible binaries, until I found ‘This’. Notes Edit make.osx

  1. MACOSX_DEPLOYMENT_TARGET=10.6
  2.  
  3. PREFIX=/usr/local
  4.  
  5. ## You shouldn't need to configure past this point (and yet…)
  6.  
  7. PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig"
  8. CFLAGS="-arch i386 -arch x86_64 -I${PREFIX}/include -I${PREFIX}/include/freetype2 -isysroot /Developer/SDKs/MacOSX10.6.sdk"
  9. LDFLAGS="-arch i386 -arch x86_64 -L${PREFIX}/lib -syslibroot,/Developer/SDKs/MacOSX10.6.sdk"
  10. FFLAGS="-arch i386 -arch x86_64"

Set

  1. wxagg = False

in setup.cfg And finally:

  1. sudo make -f make.osx fetch deps mpl_build mpl_install
  2. sudo python setup.py install
Tags: , ,
Categories: general, science Tags: , ,