Re: [Matplotlib-users] building matplotlib 1.3 on OS X 10.8.4

2013-08-23 Thread Russell E. Owen
In article e9448807-9b39-4ea8-a7b0-3f352ad2e...@gmail.com,
 James Boyle jsboyle...@gmail.com 
 wrote:

 I built MPL 1.3 from source, all seem to go OK but I ran into the problem of 
 not finding libfreetype.6.dylib when importing.

Hmmm, it works for me. (I tried it again, just now). Here is what I did:

* Make sure you have XQuartz installed. I have 2.7.4 which I got from 
Apple.

* Edit setupext.py. Change this line:
 'darwin': ['/usr/local/', '/usr', '/usr/X11', '/opt/local'],
to:
'darwin': ['/usr', '/usr/X11'],
to avoid any conflicts with any extra software you might have installed.

* Copy setup.cfg.template to setup.cfg to change:
#backend = TkAgg
to:
backend = TkAgg

* python setup.py build
* python setup.py install

I found this resulted in a matplotlib I could use just fine on 10.8. (It 
won't work on 10.6 because the X11 libraries are in the wrong place).

-- Russell


--
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] building matplotlib 1.3 on OS X 10.8.4

2013-08-22 Thread James Boyle
I built MPL 1.3 from source, all seem to go OK but I ran into the problem of 
not finding libfreetype.6.dylib when importing.

On the web, I found references to this problem for builds on OS X. The 
solutions refer to a file README.osx, which is not
present in the 1.3 distribution. The documentation 
(http://matplotlib.org/1.3.0/users/installing.html) also refers to this file 
and appears to be out of date.

I have tried fiddling with the LD_LIBRARY paths, but have not come upon a 
solution.

--Jim Boyle--
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] building matplotlib 1.3 on OS X 10.8.4

2013-08-22 Thread Scott Lasley

On Aug 22, 2013, at 10:28 PM, James Boyle jsboyle...@gmail.com wrote:

 I built MPL 1.3 from source, all seem to go OK but I ran into the problem of 
 not finding libfreetype.6.dylib when importing.
 
 On the web, I found references to this problem for builds on OS X. The 
 solutions refer to a file README.osx, which is not
 present in the 1.3 distribution. The documentation 
 (http://matplotlib.org/1.3.0/users/installing.html) also refers to this file 
 and appears to be out of date.
 
 I have tried fiddling with the LD_LIBRARY paths, but have not come upon a 
 solution.
 
 --Jim Boyle

You might try installing the latest XQuartz to see if that helps - 
http://xquartz.macosforge.org/landing/

I think you can use homebrew http://brew.sh or macports 
http://www.macports.org to install a copy of libfreetype, but it's fairly 
easy to do manually.  Here's what I've done on recent versions of OS X.  I'm 
not sure it's necessary to install everything below.  Note that this only 
builds the native architecture for the version of OS X you are using, for 
example 64 bit for OS X 10.8, so there may be problems if you have to build 
matplotlib for a different architecture.  In that case, you can add the 
appropriate CFLAGS=-arch blah parameter to ./configure 

download, unpack, configure and install pkgconfig
  curl -O http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz
  tar -xf pkg-config-0.28.tar.gz
  cd pkg-config-0.28
  ./configure --with-internal-glib
  make -j4
  sudo make install

download, unpack, configure and install freetype
  curl -O 
http://hivelocity.dl.sourceforge.net/project/freetype/freetype2/2.5.0/freetype-2.5.0.1.tar.bz2
  tar -xf freetype-2.5.0.1.tar.bz2
  cd freetype-2.5.0.1
  ./configure
  make -j4
  sudo make install

download, unpack, configure and install fontconfig
  curl -O 
http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.10.93.tar.bz2
  tar -xf fontconfig-2.10.93.tar.bz2
  cd fontconfig-2.10.93
  ./configure
  make -j4
  sudo make install

download, unpack, configure and install libpng
  curl -O 
http://hivelocity.dl.sourceforge.net/project/libpng/libpng15/1.5.17/libpng-1.5.17.tar.bz2
  tar -xf libpng-1.5.17.tar.bz2
  cd libpng-1.5.17
  make -j4
  sudo make install

download, unpack, configure and install ghostscript
  curl -O http://downloads.ghostscript.com/public/ghostscript-9.09.tar.gz
  tar -xf ghostscript-9.09.tar.gz
  cd ghostscript-9.09
  ./configure --with-x \
  --x-includes=/opt/X11/include \
  --x-libraries=/opt/X11/lib \
  --disable-gtk \
  --with-system-libtiff \
  CFLAGS=-arch x86_64 -arch i386 LDFLAGS=-arch x86_64 -arch i386
  make -j4
  sudo make install

Now python3 setup.py in the matplotlib directory should show that it found the 
libs you just installed.

I hope this works for you,
Scott
--
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users