[Fwd: Matplotlib 0.98.5 egg on Mac OS X : Install Problem]

Hi Everyone,

I am running into a problem when trying to install 0.98.5 egg on a Mac OS X
machine. Any help much appreciated. Relevant error messages follow:

Thanks
-Kaushik

sudo easy_install
matplotlib-0.98.5-py2.5-macosx-10.3.egg**********************************************************************

···

============================================================================

BUILDING MATPLOTLIB

              matplotlib: 0.98.5

                  python: 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) [GCC

                          4.0.1 (Apple Computer, Inc. build 5363)]

                platform: darwin

REQUIRED DEPENDENCIES

                   numpy: 1.2.1

               freetype2: found, but unknown version (no pkg-config)

OPTIONAL BACKEND DEPENDENCIES

                  libpng: found, but unknown version (no pkg-config)

                 Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4

                wxPython: no

                          * wxPython not found

                    Gtk+: no

                          * Building for Gtk+ requires pygtk; you must be able

                          * to "import gtk" in your build/install environment

         Mac OS X native: yes

                      Qt: no

                     Qt4: no

                   Cairo: no

OPTIONAL DATE/TIMEZONE DEPENDENCIES

                datetime: present, version unknown

                dateutil: matplotlib will provide

                    pytz: 2008c

OPTIONAL USETEX DEPENDENCIES

                  dvipng: no

             ghostscript: /bin/sh: gs: command not found

                   latex: no

EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES

               configobj: matplotlib will provide

        enthought.traits: no

[Edit setup.cfg to suppress the above messages]

============================================================================

error: lib/matplotlib/mpl-data/matplotlib.conf.template: No such file or directory

Exception exceptions.OSError: (2, 'No such file or directory', 'src/image.cpp')
in <bound method CleanUpFile.__del__ of <setupext.CleanUpFile instance at
0xf61120>> ignored

Exception exceptions.OSError: (2, 'No such file or directory', 'src/path.cpp')
in <bound method CleanUpFile.__del__ of <setupext.CleanUpFile instance at
0xf48968>> ignored

Exception exceptions.OSError: (2, 'No such file or directory',
'src/backend_agg.cpp') in <bound method CleanUpFile.__del__ of
<setupext.CleanUpFile instance at 0xf48c38>> ignored

  From within
ipython:***************************************************************************************************

In [1]: import pylab

---------------------------------------------------------------------------

ImportError Traceback (most recent call last)

/Users/kghose/<ipython console> in <module>()

/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5-macosx-10.3.egg/pylab.py
in <module>()

----> 1 from matplotlib.pylab import *

        2 import matplotlib.pylab

        3 __doc__ = matplotlib.pylab.__doc__

/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5-macosx-10.3.egg/matplotlib/pylab.py
in <module>()

      204 from numpy import ma

      205

--> 206 from matplotlib import mpl # pulls in most modules

      207

      208 from matplotlib.dates import date2num, num2date,\

/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5-macosx-10.3.egg/matplotlib/mpl.py
in <module>()

        2 from matplotlib import axis

----> 3 from matplotlib import axes

        4 from matplotlib import cbook

        5 from matplotlib import collections

        6 from matplotlib import colors

/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5-macosx-10.3.egg/matplotlib/axes.py
in <module>()

       16 import matplotlib.dates as mdates

       17 import matplotlib.font_manager as font_manager

---> 18 import matplotlib.image as mimage

       19 import matplotlib.legend as mlegend

       20 import matplotlib.lines as mlines

/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5-macosx-10.3.egg/matplotlib/image.py
in <module>()

       17 # For clarity, names from _image are given explicitly in this module:

       18 from matplotlib import _image

---> 19 from matplotlib import _png

       20

       21 # For user convenience, the names from _image are also imported into

ImportError:
dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5-macosx-10.3.egg/matplotlib/_png.so,
2): Library not loaded: /usr/local/lib/libpng12.0.dylib

    Referenced from:
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5-macosx-10.3.egg/matplotlib/_png.so

    Reason: image not found

In [2]:

Hi Everyone,

I am running into a problem when trying to install 0.98.5 egg on a Mac OS X
machine. Any help much appreciated. Relevant error messages follow:

I posted binaries to fix this problem and have requested testers, so
please try the binaries at

You might want to be sure to delete the old dir to get a clean install

sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib*

before installing the new. Let me know how it goes.

JDH

···

On Wed, Dec 17, 2008 at 2:29 PM, Kaushik Ghose <Kaushik_Ghose@...2126...> wrote:

Hi John,

The install goes fine, but I come up blank on the import.

Thanks
-Kaushik

sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib*

···

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

sudo installer -pkg matplotlib-0.98.5.1-py2.5-macosx10.5.mpkg -target /
installer: Package name is matplotlib 0.98.5.1-r0
installer: Installing at base path /
installer: The install was successful.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

In [1]: import pylab
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)

/Users/kghose/Source/<ipython console> in <module>()

/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/pylab.py in <module>()
----> 1 from matplotlib.pylab import *
       2 import matplotlib.pylab
       3 __doc__ = matplotlib.pylab.__doc__

ImportError: No module named pylab

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

John Hunter wrote:

On Wed, Dec 17, 2008 at 2:29 PM, Kaushik Ghose > <Kaushik_Ghose@...2126...> wrote:

Hi Everyone,

I am running into a problem when trying to install 0.98.5 egg on a Mac OS X
machine. Any help much appreciated. Relevant error messages follow:

I posted binaries to fix this problem and have requested testers, so
please try the binaries at

matplotlib - Browse /matplotlib/matplotlib-0.98.5 at SourceForge.net

You might want to be sure to delete the old dir to get a clean install

sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib*

before installing the new. Let me know how it goes.

JDH

Hi John,

I tried the .egg package but no joy.

Thanks
-Kaushik

sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib*

···

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

sudo easy_install matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
Processing matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
creating /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
Extracting matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg to /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages
Adding matplotlib 0.98.5.1-r0 to easy-install.pth file

Installed /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
Processing dependencies for matplotlib==0.98.5.1-r0
Searching for matplotlib==0.98.5.1-r0
Reading Links for matplotlib
Reading http://matplotlib.sourceforge.net
Reading matplotlib - Browse Files at SourceForge.net
Reading matplotlib - Browse /matplotlib at SourceForge.net
Reading matplotlib - Browse /matplotlib-maintenance at SourceForge.net
No local packages or download links found for matplotlib==0.98.5.1-r0
error: Could not find suitable distribution for Requirement.parse('matplotlib==0.98.5.1-r0')

John Hunter wrote:

On Wed, Dec 17, 2008 at 2:29 PM, Kaushik Ghose > <Kaushik_Ghose@...2126...> wrote:

Hi Everyone,

I am running into a problem when trying to install 0.98.5 egg on a Mac OS X
machine. Any help much appreciated. Relevant error messages follow:

I posted binaries to fix this problem and have requested testers, so
please try the binaries at

matplotlib - Browse /matplotlib/matplotlib-0.98.5 at SourceForge.net

You might want to be sure to delete the old dir to get a clean install

sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib*

before installing the new. Let me know how it goes.

JDH

Please run the following commands after cleaning the previous installs
and reinstalling the mpkg file::

   ls
   python -c 'import matplotlib; print matplotlib.__file__'
   python -c 'import matplotlib; print matplotlib.__version__'
   python -c 'import pylab'

The ls is important because sometimes a person has a directory named
'matplotlib' in their local path, and this is getting picked rather
than the installed matplotlib which contains the pylab module.

JDH

···

On Wed, Dec 17, 2008 at 4:43 PM, Kaushik Ghose <Kaushik_Ghose@...2126...> wrote:

Hi John,

The install goes fine, but I come up blank on the import.

Thanks
-Kaushik

sudo rm -rf
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib*

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

sudo installer -pkg matplotlib-0.98.5.1-py2.5-macosx10.5.mpkg -target /
installer: Package name is matplotlib 0.98.5.1-r0
installer: Installing at base path /
installer: The install was successful.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

In [1]: import pylab

Eggs are an abomination -- the person who named the installer
"easy_install" should have their license revoked. I think we may
distributing them because they are simply broken in too many ways.
This recurring problem -- where the easy_install goes looking on pypi
for an egg even though you are pointing at one locally on the file
system, is simply ridiculous.

Chris Barker suggests renaming the egg to matplotlib-0.98.5-py2.5.egg.
Try that, and please let me know. Thanks for the testing.

JDH

···

On Wed, Dec 17, 2008 at 4:50 PM, Kaushik Ghose <Kaushik_Ghose@...2126...> wrote:

Hi John,

I tried the .egg package but no joy.

Thanks
-Kaushik

sudo rm -rf
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib*

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

sudo easy_install matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
Processing matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
creating
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
Extracting matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg to
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages
Adding matplotlib 0.98.5.1-r0 to easy-install.pth file

Installed
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
Processing dependencies for matplotlib==0.98.5.1-r0
Searching for matplotlib==0.98.5.1-r0
Reading Links for matplotlib
Reading http://matplotlib.sourceforge.net
Reading matplotlib - Browse Files at SourceForge.net
Reading
matplotlib - Browse /matplotlib at SourceForge.net
Reading
matplotlib - Browse /matplotlib-maintenance at SourceForge.net
No local packages or download links found for matplotlib==0.98.5.1-r0
error: Could not find suitable distribution for
Requirement.parse('matplotlib==0.98.5.1-r0')

Yess! The renaming works. Would simply changing the name of the file on sourceforge solve this problem? That would be so odd! Thanks -Kaushik

mv matplotlib\-0\.98\.5\.1\_r0\-py2\.5\-macosx\-10\.3\-fat\.egg matplotlib\-0\.98\.5\-py2\.5\.egg sudo easy_install matplotlib-0.98.5-py2.5.egg
Password:
Processing matplotlib-0.98.5-py2.5.egg
creating /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5.egg
Extracting matplotlib-0.98.5-py2.5.egg to /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages
Removing matplotlib 0.98.5.1-r0 from easy-install.pth file
Adding matplotlib 0.98.5 to easy-install.pth file

Installed /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5.egg
Processing dependencies for matplotlib==0.98.5
Finished processing dependencies for matplotlib==0.98.5

···

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

and pylab imports and runs fine...

John Hunter wrote:

On Wed, Dec 17, 2008 at 4:50 PM, Kaushik Ghose > <Kaushik_Ghose@...2126...> wrote:

Hi John,

I tried the .egg package but no joy.

Thanks
-Kaushik

sudo rm -rf
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib*

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

sudo easy_install matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
Processing matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
creating
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
Extracting matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg to
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages
Adding matplotlib 0.98.5.1-r0 to easy-install.pth file

Installed
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
Processing dependencies for matplotlib==0.98.5.1-r0
Searching for matplotlib==0.98.5.1-r0
Reading Links for matplotlib
Reading http://matplotlib.sourceforge.net
Reading matplotlib - Browse Files at SourceForge.net
Reading
matplotlib - Browse /matplotlib at SourceForge.net
Reading
matplotlib - Browse /matplotlib-maintenance at SourceForge.net
No local packages or download links found for matplotlib==0.98.5.1-r0
error: Could not find suitable distribution for
Requirement.parse('matplotlib==0.98.5.1-r0')

Eggs are an abomination -- the person who named the installer
"easy_install" should have their license revoked. I think we may
distributing them because they are simply broken in too many ways.
This recurring problem -- where the easy_install goes looking on pypi
for an egg even though you are pointing at one locally on the file
system, is simply ridiculous.

Chris Barker suggests renaming the egg to matplotlib-0.98.5-py2.5.egg.
Try that, and please let me know. Thanks for the testing.

JDH

Hi John,

This is odd. After successfully installing the egg (last post) and then removing it by doing

sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib*

I now get
sudo installer -pkg matplotlib-0.98.5.1-py2.5-macosx10.5.mpkg -target /
installer: Package name is matplotlib 0.98.5.1-r0
installer: Upgrading at base path /
installer: The upgrade was successful.

So there are some files I haven't gotten rid of, what should I be looking to remove?

Thanks!
-Kaushik

John Hunter wrote:

···

On Wed, Dec 17, 2008 at 4:43 PM, Kaushik Ghose > <Kaushik_Ghose@...2126...> wrote:

Hi John,

The install goes fine, but I come up blank on the import.

Thanks
-Kaushik

sudo rm -rf
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib*

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

sudo installer -pkg matplotlib-0.98.5.1-py2.5-macosx10.5.mpkg -target /
installer: Package name is matplotlib 0.98.5.1-r0
installer: Installing at base path /
installer: The install was successful.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

In [1]: import pylab

Please run the following commands after cleaning the previous installs
and reinstalling the mpkg file::

   ls
   python -c 'import matplotlib; print matplotlib.__file__'
   python -c 'import matplotlib; print matplotlib.__version__'
   python -c 'import pylab'

The ls is important because sometimes a person has a directory named
'matplotlib' in their local path, and this is getting picked rather
than the installed matplotlib which contains the pylab module.

JDH

Kaushik Ghose wrote:

Hi John,

This is odd. After successfully installing the egg (last post) and then removing it by doing

sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib*

I now get
sudo installer -pkg matplotlib-0.98.5.1-py2.5-macosx10.5.mpkg -target /
installer: Package name is matplotlib 0.98.5.1-r0
installer: Upgrading at base path /
installer: The upgrade was successful.

So there are some files I haven't gotten rid of, what should I be looking to remove?

What's the problem here? this looks successful to me. If you're referring to the "Upgrading" -- I think that's because the Mac pkg installer keep some kind of record that is separate from the python tree.

At home without my Mac, so can't test myself now -- sorry.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...