Mac OS X 10.6 dmg install (Tim Gray)

Hi Tim,

From what I gather you are trying to install everything from source the trying to install via the dmg. I did a fresh install of python, matplotlib and a number of other packages today (on 10.6) and maybe it would be helpful to see how to install from source. When installing Python, be sure to use --enable-framework. I used a /usr/local prefix though this may be somewhere else for you.

$ wget http://www.python.org/ftp/python/2.6.5/Python-2.6.5.tar.bz2
$ tar -jxvf Python-2.6.5.tar.bz2
$ cd Python-2.6.5
$ ./configure --prefix=/usr/local --enable-framework
$ make
$ make install

It appears that you have already installed numpy and so you would also need the following:

dateutils
$ sudo wget http://labix.org/download/python-dateutil/python-dateutil-1.5.tar.gz
$ sudo tar xzf python-dateutil-1.5.tar.gz
$ cd python-dateutil-1.5
$ sudo /usr/local/bin/python setup.py install

freetype
$ http://download.savannah.gnu.org/releases-noredirect/freetype/freetype-2.3.12.tar.gz
$ sudo tar xzf freetype-2.3.12.tar.gz
$ cd freetype-2.3.12
$ sudo ./configure --prefix=/usr/local
$ sudo make
$ sudo make install

libpng
$ sudo wget http://sourceforge.net/projects/libpng/files/01-libpng-master/1.4.2/libpng-1.4.2.tar.gz/download
$ sudo tar xzf libpng-1.4.2.tar.gz
$ cd libpng-1.4.2
$ sudo ./configure --prefix=/usr/local
$ sudo make
$ sudo make install

pkconfig
$ sudo wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.22.tar.gz
$ sudo tar xzf pkg-config-0.22.tar.gz
$ cd pkg-config-0.22
$ sudo ./configure --prefix=/usr/local
$ sudo make
$ sudo make install

Finally, you should be able to install matplotlib from source using,
$ sudo wget http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.3/matplotlib-0.99.3.tar.gz/download
$ sudo tar xzf matplotlib-0.99.3.tar.gz
$ cd matplotlib-0.99.3
$ sudo /usr/local/bin/python setup.py build
$ sudo /usr/local/bin/python setup.py install_*

···

*_
Hopefully this helps.

-Adam Richards

Duke University

I'm actually trying to install from the prepackaged dmgs. That would speed things up for me quite a bit. All the other components went fine, but it looks like the matplotlib dmg is configured for the wrong location. I saw a couple mentions of this in the archives but no responses...

I guess I'll try from source if no one has a different solution. Your notes will help me if I have to do that. Thanks!

···

On Jun 24, 2010 at 08:58 PM -0400, Adam J Richards wrote:

Hi Tim,

From what I gather you are trying to install everything from source the
trying to install via the dmg. I did a fresh install of python,
matplotlib and a number of other packages today (on 10.6) and maybe it
would be helpful to see how to install from source. When installing
Python, be sure to use --enable-framework. I used a /usr/local prefix
though this may be somewhere else for you.

Tim,

I think you just need to direct the PYTHONPATH variable to the place where matplotlib is installed. My PYTHONPATH looks like this:

/Library/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages:/Library/Python/2.6/site-packages

Hana

···

On 6/24/10 6:45 PM, Tim Gray wrote:

On Jun 24, 2010 at 08:58 PM -0400, Adam J Richards wrote:
   

Hi Tim,

From what I gather you are trying to install everything from source the
trying to install via the dmg. I did a fresh install of python,
matplotlib and a number of other packages today (on 10.6) and maybe it
would be helpful to see how to install from source. When installing
Python, be sure to use --enable-framework. I used a /usr/local prefix
though this may be somewhere else for you.
     

I'm actually trying to install from the prepackaged dmgs. That would speed
things up for me quite a bit. All the other components went fine, but it
looks like the matplotlib dmg is configured for the wrong location. I saw a
couple mentions of this in the archives but no responses...

I guess I'll try from source if no one has a different solution. Your notes
will help me if I have to do that. Thanks!

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

I have followed these instructions to (almost ) the letter.
Only difference is that python was already installed at /Library/Frameworks/Python.framework/Versions/2.6/bin/python
I also re-installed numpy.

Still no good with always the same problem - the absence of numpy.core.ma

Any suggestions?

Christopher

···

----

from pylab import randn, hist

/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/__init__.py:62: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5, os, re, shutil, sys, warnings
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pytz/tzinfo.py:5: DeprecationWarning: the sets module is deprecated
  from sets import Set
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/__init__.py:606: UserWarning: Bad val "MacOSX" on line #31
  "backend : MacOSX
"
  in file "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/mpl-data/matplotlibrc"
  Unrecognized backend string "macosx": valid strings are ['Cairo', 'GD', 'CocoaAgg', 'GDK', 'PS', 'GTKAgg', 'GTK', 'Paint', 'QtAgg', 'Template', 'Agg2', 'Aqt', 'FltkAgg', 'TkAgg', 'WX', 'Qt4Agg', 'EMF', 'Agg', 'SVG', 'GTKCairo', 'WXAgg', 'Pdf']
  "%s"\n\t%s' % (val, cnt, line, fname, msg))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pylab.py", line 1, in <module>
    from matplotlib.pylab import *
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pylab.py", line 206, in <module>
    from matplotlib.numerix import npyma as ma
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/numerix/__init__.py", line 166, in <module>
    __import__('ma', g, l)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/numerix/ma/__init__.py", line 16, in <module>
    from numpy.core.ma import *
ImportError: No module named ma
----

On 25 Jun 2010, at 01:58, Adam J Richards wrote:

Hi Tim,

From what I gather you are trying to install everything from source the
trying to install via the dmg. I did a fresh install of python,
matplotlib and a number of other packages today (on 10.6) and maybe it
would be helpful to see how to install from source. When installing
Python, be sure to use --enable-framework. I used a /usr/local prefix
though this may be somewhere else for you.

$ wget http://www.python.org/ftp/python/2.6.5/Python-2.6.5.tar.bz2
$ tar -jxvf Python-2.6.5.tar.bz2
$ cd Python-2.6.5
$ ./configure --prefix=/usr/local --enable-framework
$ make
$ make install

It appears that you have already installed numpy and so you would also
need the following:

dateutils
$ sudo wget
http://labix.org/download/python-dateutil/python-dateutil-1.5.tar.gz
$ sudo tar xzf python-dateutil-1.5.tar.gz
$ cd python-dateutil-1.5
$ sudo /usr/local/bin/python setup.py install

freetype
$
http://download.savannah.gnu.org/releases-noredirect/freetype/freetype-2.3.12.tar.gz
$ sudo tar xzf freetype-2.3.12.tar.gz
$ cd freetype-2.3.12
$ sudo ./configure --prefix=/usr/local
$ sudo make
$ sudo make install

libpng
$ sudo wget
http://sourceforge.net/projects/libpng/files/01-libpng-master/1.4.2/libpng-1.4.2.tar.gz/download
$ sudo tar xzf libpng-1.4.2.tar.gz
$ cd libpng-1.4.2
$ sudo ./configure --prefix=/usr/local
$ sudo make
$ sudo make install

pkconfig
$ sudo wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.22.tar.gz
$ sudo tar xzf pkg-config-0.22.tar.gz
$ cd pkg-config-0.22
$ sudo ./configure --prefix=/usr/local
$ sudo make
$ sudo make install

Finally, you should be able to install matplotlib from source using,
$ sudo wget
http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.3/matplotlib-0.99.3.tar.gz/download
$ sudo tar xzf matplotlib-0.99.3.tar.gz
$ cd matplotlib-0.99.3
$ sudo /usr/local/bin/python setup.py build
$ sudo /usr/local/bin/python setup.py install_*
*_
Hopefully this helps.

-Adam Richards

Duke University

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

FWIW, I have had exactly this same problem, though I have not attempted
the very helpful instructions others have supplied in response to this
thread.

I am in the undesirable situation of using different Python
distributions depending on what features I require: either my "main"
copy, for most operations (some other applications I have installed will
only use this), EPD (32-bit) when I want all the bells and whistles of
EPD, and in some circumstances I opt for a customized version of Sage
Math which includes specialized packages that install easily.

Ian

···

On 6/25/10 8:23 AM, Christopher Brewster wrote:

I have followed these instructions to (almost ) the letter.
Only difference is that python was already installed at /Library/Frameworks/Python.framework/Versions/2.6/bin/python
I also re-installed numpy.

Still no good with always the same problem - the absence of numpy.core.ma

I think that underscores the problem. The matplotlib OS X dmg installer installs matplotlib in the site-packages directory for the system default install of Python (2.6.1). Everywhere I read insists that on OS X you should install python.org's python, which puts it's site-packages in the location you say. The numpy installer puts stuff in the right place. But matplotlib is not there.

···

On Jun 24, 2010 at 09:37 PM -0700, Hana Sevcikova wrote:

I think you just need to direct the PYTHONPATH variable to the place where matplotlib is installed. My PYTHONPATH looks like this:

/Library/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages:/Library/Python/2.6/site-packages