OS X (Intel Mac) installation woes

Hi all

I’m having trouble installing on OS X. The short story is it looks like something file is trying to build something for a ppc architecture when I’m on an Intel mac.

Here’s the long story:

First I downloaded the matplotlib-0.99.3-py2.5-macosx-10.3.egg file but it complained that I didn’t have numpy 1.1 as the version that comes with OS X is 1.0.1. So I tried matplotlib-0.91.4-py2.5-macosx-10.3.egg but that complained about not being able to download the matplotlib package.

So then I installed MacPython from the python website, and installed NumPy from the SciPy website (both of which use standard OS X installation tools), and installed the easy_install script (because the one that comes with OS X looks at the built-in python libs not the ones I just installed). Now running

/Library/Frameworks/Python.framework/Versions/2.5/bin/easy_install ~/Downloads/matplotlib-0.98.3-py2.5-macosx-10.3.egg

gives a bunch of errors. Full output is below. The line “ld: in /opt/local/lib/libJPEG.dylib, file is not of required architecture for architecture ppc” looks suspicious to me, since I’m on an Intel Mac.

Am I doing something wrong or is this a problem with the egg file? Does anyone have instructions for installing matplotlib successfully on an Intel Mac? I’m pretty new to python so please forgive me if I’m doing something silly.

Nathaniel

Processing matplotlib-0.98.3-py2.5-macosx-10.3.egg
removing ‘/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3.egg’ (and everything under it)

creating /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3.egg
Extracting matplotlib-0.98.3-py2.5-macosx-10.3.egg to /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages

matplotlib 0.98.3 is already the active version in easy-install.pth

Installed /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3.egg
Processing dependencies for matplotlib==0.98.3

Searching for matplotlib==0.98.3
Reading http://pypi.python.org/simple/matplotlib/
Reading http://matplotlib.sourceforge.net

Reading https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194
Reading https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474

Reading http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474
Reading http://sourceforge.net/project/showfiles.php?group_id=80706

Best match: matplotlib 0.98.3
Downloading http://downloads.sourceforge.net/matplotlib/matplotlib-0.98.3.tar.gz?modtime=1217773039&big_mirror=0

Processing matplotlib-0.98.3.tar.gz
Running matplotlib-0.98.3/setup.py -q bdist_egg --dist-dir /var/folders/-o/-oFJ5-G6HuK5pe-MeCIFOE+++TQ/-Tmp-/easy_install-5GMKQj/matplotlib-0.98.3/egg-dist-tmp-xTqKsx

···

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

BUILDING MATPLOTLIB
matplotlib: 0.98.3
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.1.1
freetype2: 9.16.3

OPTIONAL BACKEND DEPENDENCIES
libpng: 1.2.25
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

                Qt: no
               Qt4: no
             Cairo: no

OPTIONAL DATE/TIMEZONE DEPENDENCIES
datetime: present, version unknown
dateutil: matplotlib will provide

              pytz: matplotlib will provide

OPTIONAL USETEX DEPENDENCIES
dvipng: 1.9
ghostscript: 8.61
latex: 3.141592

EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES

         configobj: matplotlib will provide
  enthought.traits: no

[Edit setup.cfg to suppress the above messages]

warning: no files found matching ‘NUMARRAY_ISSUES’

warning: no files found matching ‘MANIFEST’
warning: no files found matching ‘matplotlibrc’
warning: no files found matching ‘makeswig.py’
warning: no files found matching ‘examples/data/*’

warning: no files found matching ‘lib/mpl_toolkits’
warning: no files found matching ‘’ under directory ‘examples’
warning: no files found matching '
’ under directory ‘swig’

In file included from /usr/include/math.h:26,
from /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/pyport.h:231,
from /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h:57,

             from ./CXX/WrapPython.h:42,
             from CXX/cxxextensions.c:38:

/usr/include/architecture/ppc/math.h:675: warning: conflicting types for built-in function ‘scalb’
ld: warning in /opt/local/lib/libfreetype.dylib, file is not of required architecture

ld: warning in /opt/local/lib/libz.dylib, file is not of required architecture
ld: in /opt/local/lib/libJPEG.dylib, file is not of required architecture for architecture ppc
collect2: ld returned 1 exit status
ld: warning, duplicate dylib /opt/local/lib/libz.1.dylib

lipo: can’t open input file: /var/folders/-o/-oFJ5-G6HuK5pe-MeCIFOE+++TQ/-Tmp-//ccBp4SVz.out (No such file or directory)
error: Setup script exited with error: command ‘g++’ failed with exit status 1
Exception exceptions.OSError: (2, ‘No such file or directory’, ‘src/image.cpp’) in <bound method CleanUpFile.del of <setupext.CleanUpFile instance at 0x1b3ffa8>> ignored

Exception exceptions.OSError: (2, ‘No such file or directory’, ‘src/path.cpp’) in <bound method CleanUpFile.del of <setupext.CleanUpFile instance at 0x1b3f828>> ignored
Exception exceptions.OSError: (2, ‘No such file or directory’, ‘src/backend_agg.cpp’) in <bound method CleanUpFile.del of <setupext.CleanUpFile instance at 0x1b3fb70>> ignored

This comes up every so often, and there really should be more instructions on the website; suffice it to say, it's trying to resolve dependencies that are actually satisfied by the package yoiu downloaded (it is a "fat" binary, universal - both PPC and Intel) but distutils is being somewhat obtuse for an unknown (to me) reason.

That said, the build on the matplotlib website is self-sufficient save for numpy, use the -N flag to easy_install (and don't forget to run it with sudo). This should take care of things.

Cheers,

David

···

On 16-Aug-08, at 8:36 AM, Nathaniel Virgo wrote:

Hi all

I'm having trouble installing on OS X. The short story is it looks like something file is trying to build something for a ppc architecture when I'm on an Intel mac.

Here's the long story:

First I downloaded the matplotlib-0.99.3-py2.5-macosx-10.3.egg file but it complained that I didn't have numpy 1.1 as the version that comes with OS X is 1.0.1. So I tried matplotlib-0.91.4-py2.5-macosx-10.3.egg but that complained about not being able to download the matplotlib package.

So then I installed MacPython from the python website, and installed NumPy from the SciPy website (both of which use standard OS X installation tools), and installed the easy_install script (because the one that comes with OS X looks at the built-in python libs not the ones I just installed). Now running

/Library/Frameworks/Python.framework/Versions/2.5/bin/easy_install ~/Downloads/matplotlib-0.98.3-py2.5-macosx-10.3.egg

gives a bunch of errors. Full output is below. The line "ld: in /opt/local/lib/libJPEG.dylib, file is not of required architecture for architecture ppc" looks suspicious to me, since I'm on an Intel Mac.

Am I doing something wrong or is this a problem with the egg file? Does anyone have instructions for installing matplotlib successfully on an Intel Mac? I'm pretty new to python so please forgive me if I'm doing something silly.

Nathaniel

Processing matplotlib-0.98.3-py2.5-macosx-10.3.egg
removing '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3.egg' (and everything under it)
creating /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3.egg
Extracting matplotlib-0.98.3-py2.5-macosx-10.3.egg to /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages
matplotlib 0.98.3 is already the active version in easy-install.pth

Installed /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3.egg
Processing dependencies for matplotlib==0.98.3
Searching for matplotlib==0.98.3
Reading Links for matplotlib
Reading http://matplotlib.sourceforge.net
Reading matplotlib - Browse /matplotlib at SourceForge.net
Reading matplotlib - Browse /matplotlib-maintenance at SourceForge.net
Reading http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474
Reading matplotlib - Browse Files at SourceForge.net
Best match: matplotlib 0.98.3
Downloading http://downloads.sourceforge.net/matplotlib/matplotlib-0.98.3.tar.gz?modtime=1217773039&big_mirror=0
Processing matplotlib-0.98.3.tar.gz
Running matplotlib-0.98.3/setup.py -q bdist_egg --dist-dir /var/folders/-o/-oFJ5-G6HuK5pe-MeCIFOE+++TQ/-Tmp-/easy_install-5GMKQj/matplotlib-0.98.3/egg-dist-tmp-xTqKsx

BUILDING MATPLOTLIB
            matplotlib: 0.98.3
                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.1.1
             freetype2: 9.16.3

OPTIONAL BACKEND DEPENDENCIES
                libpng: 1.2.25
               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
                    Qt: no
                   Qt4: no
                 Cairo: no

OPTIONAL DATE/TIMEZONE DEPENDENCIES
              datetime: present, version unknown
              dateutil: matplotlib will provide
                  pytz: matplotlib will provide

OPTIONAL USETEX DEPENDENCIES
                dvipng: 1.9
           ghostscript: 8.61
                 latex: 3.141592

EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES
             configobj: matplotlib will provide
      enthought.traits: no

[Edit setup.cfg to suppress the above messages]

warning: no files found matching 'NUMARRAY_ISSUES'
warning: no files found matching 'MANIFEST'
warning: no files found matching 'matplotlibrc'
warning: no files found matching 'makeswig.py'
warning: no files found matching 'examples/data/*'
warning: no files found matching 'lib/mpl_toolkits'
warning: no files found matching '*' under directory 'examples'
warning: no files found matching '*' under directory 'swig'
In file included from /usr/include/math.h:26,
                 from /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/pyport.h:231,
                 from /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h:57,
                 from ./CXX/WrapPython.h:42,
                 from CXX/cxxextensions.c:38:
/usr/include/architecture/ppc/math.h:675: warning: conflicting types for built-in function 'scalb'
ld: warning in /opt/local/lib/libfreetype.dylib, file is not of required architecture
ld: warning in /opt/local/lib/libz.dylib, file is not of required architecture
ld: in /opt/local/lib/libJPEG.dylib, file is not of required architecture for architecture ppc
collect2: ld returned 1 exit status
ld: warning, duplicate dylib /opt/local/lib/libz.1.dylib
lipo: can't open input file: /var/folders/-o/-oFJ5-G6HuK5pe-MeCIFOE+++TQ/-Tmp-//ccBp4SVz.out (No such file or directory)
error: Setup script exited with error: command 'g++' failed with exit status 1
Exception exceptions.OSError: (2, 'No such file or directory', 'src/image.cpp') in <bound method CleanUpFile.__del__ of <setupext.CleanUpFile instance at 0x1b3ffa8>> ignored
Exception exceptions.OSError: (2, 'No such file or directory', 'src/path.cpp') in <bound method CleanUpFile.__del__ of <setupext.CleanUpFile instance at 0x1b3f828>> ignored
Exception exceptions.OSError: (2, 'No such file or directory', 'src/backend_agg.cpp') in <bound method CleanUpFile.__del__ of <setupext.CleanUpFile instance at 0x1b3fb70>> ignored

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options