Installing Matplotlib

Hey all,

I’ve been having a lot of trouble installing matplotlib. I’m using a macbook, on version 10.5.4 of Mac OS, intel processor (if that’s important). I’ve installed both numpy and scipy without problems, but when I type this command to install matplotlib:

CFLAGS="-Os -arch i386 -arch ppc" LDFLAGS="-Os -arch i386 -arch ppc" python setup.py build

I get this output:

···

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

BUILDING MATPLOTLIB

matplotlib: 0.98.3

python: 2.5 (r25:51918, Sep 19 2006, 08:49:13) [GCC 4.0.1

(Apple Computer, Inc. build 5341)]

platform: darwin

REQUIRED DEPENDENCIES

numpy: 1.2.0.dev5513

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

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: 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]

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

running build

running build_py

copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.macosx-10.3-fat-2.5/matplotlib/mpl-data

copying lib/matplotlib/mpl-data/matplotlib.conf -> build/lib.macosx-10.3-fat-2.5/matplotlib/mpl-data

running build_ext

building ‘matplotlib.ft2font’ extension

g++ -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup -Os -arch i386 -arch ppc -Os -arch i386 -arch ppc build/temp.macosx-10.3-fat-2.5/src/ft2font.o build/temp.macosx-10.3-fat-2.5/src/mplutils.o build/temp.macosx-10.3-fat-2.5/CXX/cxx_extensions.o build/temp.macosx-10.3-fat-2.5/CXX/cxxsupport.o build/temp.macosx-10.3-fat-2.5/CXX/IndirectPythonInterface.o build/temp.macosx-10.3-fat-2.5/CXX/cxxextensions.o -L/usr/local/lib -L/usr/lib -L/usr/X11R6/lib -lfreetype -lz -lstdc++ -lm -o build/lib.macosx-10.3-fat-2.5/matplotlib/ft2font.so

ld warning: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libstdc++.dylib, file is not of required architecture

ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libstdc++.6.dylib, file is not of required architecture for architecture i386

collect2: ld returned 1 exit status

ld warning: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libstdc++.dylib, file is not of required architecture

ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libstdc++.6.dylib, file is not of required architecture for architecture ppc

collect2: ld returned 1 exit status

lipo: can’t open input file: /var/folders/S0/S0i2z-OAEtG1ZHpis54obU+++TM/-Tmp-//ccfhpaN5.out (No such file or directory)

error: command ‘g++’ failed with exit status 1

Has anyone had this problem or know what’s even going here? Any help would be greatly appreciated.

Thanks,

Ari

are you sure you need to specify -arch i386 -arch ppc and not only -arch ppc ??
It seems that according to the log mentioning i386 here does not please the linker. Maybe try without it?

my 2 cents,
Johann

Ari Ehrmann wrote:

···

Hey all,

I've been having a lot of trouble installing matplotlib. I'm using a macbook, on version 10.5.4 of Mac OS, intel processor (if that's important). I've installed both numpy and scipy without problems, but when I type this command to install matplotlib:

CFLAGS="-Os -arch i386 -arch ppc" LDFLAGS="-Os -arch i386 -arch ppc" python setup.py build

I get this output:

============================================================================
BUILDING MATPLOTLIB
            matplotlib: 0.98.3
                python: 2.5 (r25:51918, Sep 19 2006, 08:49:13) [GCC 4.0.1
                        (Apple Computer, Inc. build 5341)]
              platform: darwin

REQUIRED DEPENDENCIES
                 numpy: 1.2.0.dev5513
             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
                    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: 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]

running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.macosx-10.3-fat-2.5/matplotlib/mpl-data
copying lib/matplotlib/mpl-data/matplotlib.conf -> build/lib.macosx-10.3-fat-2.5/matplotlib/mpl-data
running build_ext
building 'matplotlib.ft2font' extension
g++ -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup -Os -arch i386 -arch ppc -Os -arch i386 -arch ppc build/temp.macosx-10.3-fat-2.5/src/ft2font.o build/temp.macosx-10.3-fat-2.5/src/mplutils.o build/temp.macosx-10.3-fat-2.5/CXX/cxx_extensions.o build/temp.macosx-10.3-fat-2.5/CXX/cxxsupport.o build/temp.macosx-10.3-fat-2.5/CXX/IndirectPythonInterface.o build/temp.macosx-10.3-fat-2.5/CXX/cxxextensions.o -L/usr/local/lib -L/usr/lib -L/usr/X11R6/lib -lfreetype -lz -lstdc++ -lm -o build/lib.macosx-10.3-fat-2.5/matplotlib/ft2font.so
ld warning: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libstdc++.dylib, file is not of required architecture
ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libstdc++.6.dylib, file is not of required architecture for architecture i386
collect2: ld returned 1 exit status
ld warning: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libstdc++.dylib, file is not of required architecture
ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libstdc++.6.dylib, file is not of required architecture for architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/S0/S0i2z-OAEtG1ZHpis54obU+++TM/-Tmp-//ccfhpaN5.out (No such file or directory)
error: command 'g++' failed with exit status 1

Has anyone had this problem or know what's even going here? Any help would be greatly appreciated.

Thanks,
Ari ------------------------------------------------------------------------

-------------------------------------------------------------------------
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

Compiling some packages as fat binaries is a bit tricky. For some reason the double arch flag is messing it up. Are you set up using gcc 3.x or 4.x?

If I recall correctly there has been some discussion of problems building matplotlib on the pythonmac-sig list, you might want to try looking in the archives over there.

For that matter, is there a reason you don't want to use the binary on sourceforge? The python 2.5 version that's posted for 0.98.1 is dual architecture.

David

···

On 27-Jul-08, at 7:44 PM, Ari Ehrmann wrote:

Hey all,

I've been having a lot of trouble installing matplotlib. I'm using a macbook, on version 10.5.4 of Mac OS, intel processor (if that's important). I've installed both numpy and scipy without problems, but when I type this command to install matplotlib:

CFLAGS="-Os -arch i386 -arch ppc" LDFLAGS="-Os -arch i386 -arch ppc" python setup.py build

I get this output:

============================================================================
BUILDING MATPLOTLIB
            matplotlib: 0.98.3
                python: 2.5 (r25:51918, Sep 19 2006, 08:49:13) [GCC 4.0.1
                        (Apple Computer, Inc. build 5341)]
              platform: darwin

REQUIRED DEPENDENCIES
                 numpy: 1.2.0.dev5513
             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
                    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: 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]

running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.macosx-10.3-fat-2.5/matplotlib/mpl-data
copying lib/matplotlib/mpl-data/matplotlib.conf -> build/lib.macosx-10.3-fat-2.5/matplotlib/mpl-data
running build_ext
building 'matplotlib.ft2font' extension
g++ -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup -Os -arch i386 -arch ppc -Os -arch i386 -arch ppc build/temp.macosx-10.3-fat-2.5/src/ft2font.o build/temp.macosx-10.3-fat-2.5/src/mplutils.o build/temp.macosx-10.3-fat-2.5/CXX/cxx_extensions.o build/temp.macosx-10.3-fat-2.5/CXX/cxxsupport.o build/temp.macosx-10.3-fat-2.5/CXX/IndirectPythonInterface.o build/temp.macosx-10.3-fat-2.5/CXX/cxxextensions.o -L/usr/local/lib -L/usr/lib -L/usr/X11R6/lib -lfreetype -lz -lstdc++ -lm -o build/lib.macosx-10.3-fat-2.5/matplotlib/ft2font.so
ld warning: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libstdc++.dylib, file is not of required architecture
ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libstdc++.6.dylib, file is not of required architecture for architecture i386
collect2: ld returned 1 exit status
ld warning: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libstdc++.dylib, file is not of required architecture
ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libstdc++.6.dylib, file is not of required architecture for architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/S0/S0i2z-OAEtG1ZHpis54obU+++TM/-Tmp-//ccfhpaN5.out (No such file or directory)
error: command 'g++' failed with exit status 1

Has anyone had this problem or know what's even going here? Any help would be greatly appreciated.

Thanks,
Ari
-------------------------------------------------------------------------
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

Hi,

While others have mentioned the dual architecture problem, I'm going to completely divert your question and just point you to these two install notes for os x ... I think the last time I compiled matplotlib from source, I followed this .. it worked quite flawlessly on my MBP:
http://ipython.scipy.org/moin/Py4Science/InstallationOSX

Hopefully that will get you up and running, but if creating a universal binary is important to you, you can try looking here:
http://ipython.scipy.org/moin/MatplotlibOSXBuildNotes

HTH,
-steve

···

On Jul 27, 2008, at 7:44 PM, Ari Ehrmann wrote:

Hey all,

I've been having a lot of trouble installing matplotlib. I'm using a macbook, on version 10.5.4 of Mac OS, intel processor (if that's important). I've installed both numpy and scipy without problems, but when I type this command to install matplotlib:

CFLAGS="-Os -arch i386 -arch ppc" LDFLAGS="-Os -arch i386 -arch ppc" python setup.py build

I get this output:

============================================================================
BUILDING MATPLOTLIB
            matplotlib: 0.98.3
                python: 2.5 (r25:51918, Sep 19 2006, 08:49:13) [GCC 4.0.1
                        (Apple Computer, Inc. build 5341)]
              platform: darwin

REQUIRED DEPENDENCIES
                 numpy: 1.2.0.dev5513
             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
                    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: 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]

running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.macosx-10.3-fat-2.5/matplotlib/mpl-data
copying lib/matplotlib/mpl-data/matplotlib.conf -> build/lib.macosx-10.3-fat-2.5/matplotlib/mpl-data
running build_ext
building 'matplotlib.ft2font' extension
g++ -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup -Os -arch i386 -arch ppc -Os -arch i386 -arch ppc build/temp.macosx-10.3-fat-2.5/src/ft2font.o build/temp.macosx-10.3-fat-2.5/src/mplutils.o build/temp.macosx-10.3-fat-2.5/CXX/cxx_extensions.o build/temp.macosx-10.3-fat-2.5/CXX/cxxsupport.o build/temp.macosx-10.3-fat-2.5/CXX/IndirectPythonInterface.o build/temp.macosx-10.3-fat-2.5/CXX/cxxextensions.o -L/usr/local/lib -L/usr/lib -L/usr/X11R6/lib -lfreetype -lz -lstdc++ -lm -o build/lib.macosx-10.3-fat-2.5/matplotlib/ft2font.so
ld warning: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libstdc++.dylib, file is not of required architecture
ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libstdc++.6.dylib, file is not of required architecture for architecture i386
collect2: ld returned 1 exit status
ld warning: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libstdc++.dylib, file is not of required architecture
ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libstdc++.6.dylib, file is not of required architecture for architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/S0/S0i2z-OAEtG1ZHpis54obU+++TM/-Tmp-//ccfhpaN5.out (No such file or directory)
error: command 'g++' failed with exit status 1

Has anyone had this problem or know what's even going here? Any help would be greatly appreciated.

Thanks,
Ari
-------------------------------------------------------------------------
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