Install problem on Leopard

Hi Folks,

I'm having some trouble installing Matplotlib on a Macbook pro running Leopard.

I installed macpython 2.5.2, and I have numpy and scipy installed from
source for the 2.5.2 installation.

Compiling Matplotlib from source, or easy_installing the egg
(matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg) both fail with the same
error:

···

From the egg:

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

........

ld: in /sw/lib/libJPEG.dylib, file is not of required architecture for
architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccG9WQI9.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 0x1b5f4b8>> ignored
Exception exceptions.OSError: (2, 'No such file or directory',
'src/transforms.cpp') in <bound method CleanUpFile.__del__ of
<setupext.CleanUpFile instance at 0x1b5ccd8>> ignored
Exception exceptions.OSError: (2, 'No such file or directory',
'src/backend_agg.cpp') in <bound method CleanUpFile.__del__ of
<setupext.CleanUpFile instance at 0x1b5f030>> ignored
--------------------------

And from source:

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

...

building 'matplotlib.ft2font' extension
g++ -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g
-bundle -undefined dynamic_lookup
build/temp.macosx-10.3-i386-2.5/src/ft2font.o
build/temp.macosx-10.3-i386-2.5/src/mplutils.o
build/temp.macosx-10.3-i386-2.5/CXX/cxx_extensions.o
build/temp.macosx-10.3-i386-2.5/CXX/cxxsupport.o
build/temp.macosx-10.3-i386-2.5/CXX/IndirectPythonInterface.o
build/temp.macosx-10.3-i386-2.5/CXX/cxxextensions.o -L/usr/X11/lib
-L/usr/local/lib -L/usr/lib -L/sw/lib -L/usr/X11R6/lib -lfreetype -lz
-lstdc++ -lm -o build/lib.macosx-10.3-i386-2.5/matplotlib/ft2font.so
-Wl,-framework,CoreServices,-framework,ApplicationServices
ld: in /sw/lib/libJPEG.dylib, file is not of required architecture for
architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccMIVHPU.out (No such file or directory)
error: command 'g++' failed with exit status 1

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

Has anyone else hit up against this before. Do I need to update
libJPEG, or modify setup.py?

Cheers,

-------------------------
Andrew Charles

Andrew Charles wrote:

Compiling Matplotlib from source, or easy_installing the egg

From the egg:

ld: in /sw/lib/libJPEG.dylib, file is not of required architecture for

hmm -- odd, I wouldn't think the egg should be linked against what looks like a macports libJPEG -- are you sure it isn't trying to build the egg when you easy_install?

And from source:

ld: in /sw/lib/libJPEG.dylib, file is not of required architecture for
architecture ppc

It's trying to link against a macports libJPEG. However, macports doesn't build universal binaries, and the MacPython tries to build them, and hence the problem.

I'd try to find another libJPEG -- The UnixImageIO Frameworks form KyngChaos are a good choice, though I don't know off the top of my head how to get MPL to find them.

http://www.kyngchaos.com/wiki/software:frameworks

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

I agree you are not using a universal build of python to compile matplotlib. You cannot pass in the “-arch i386 -arch ppc” flags. Only pass the architecture of your computer.

  • Charlie
···

On Thu, Mar 20, 2008 at 7:13 PM, Christopher Barker <Chris.Barker@…259…> wrote:

Andrew Charles wrote:

Compiling Matplotlib from source, or easy_installing the egg

From the egg:

ld: in /sw/lib/libJPEG.dylib, file is not of required architecture for

hmm – odd, I wouldn’t think the egg should be linked against what looks

like a macports libJPEG – are you sure it isn’t trying to build the

egg when you easy_install?

And from source:

ld: in /sw/lib/libJPEG.dylib, file is not of required architecture for

architecture ppc

It’s trying to link against a macports libJPEG. However, macports

doesn’t build universal binaries, and the MacPython tries to build them,

and hence the problem.

I’d try to find another libJPEG – The UnixImageIO Frameworks form

KyngChaos are a good choice, though I don’t know off the top of my head

how to get MPL to find them.

http://www.kyngchaos.com/wiki/software:frameworks

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


This SF.net email is sponsored by: Microsoft

Defy all challenges. Microsoft(R) Visual Studio 2008.

http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Charlie Moad wrote:

I agree you are not using a universal build of python to compile matplotlib. You cannot pass in the "-arch i386 -arch ppc" flags. Only pass the architecture of your computer.

Actually, I think the OP IS using a universal python, thus both flags -- he isn't manually passing in any flags at all. The problem is that it's trying to link in a jpeg lib that isn't Universal.

Is there a Universal Binary egg that will work with MacPython 2.5?

Note to OP -- maybe you'd have better luck with Apple's Python 2.5 -- it seems that that's what more people are using with Leopard.

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

Hi. I'm making scientific graphs again, so i just got back on this mailing list after a two year hiatus.

I am using:
matplotlib-0.90.0-py2.5-macosx-10.4-fat.egg

Here is a simple program:

#!/usr/bin/python

broken_log_demo.png

broken_log_demo.pdf (43.9 KB)

···

#
# Do our plots with matplotlib

import matplotlib
matplotlib.use('Agg')
from pylab import *

fig = figure(num=1,figsize=(6.5,4))
ax = fig.add_axes([.15,.3,.8,.65])
ax.set_title("Why is the Y axes upside down?")
ax.set_yscale('log')
ax.set_ylabel('Queries per second')

ax.bar(1,1000,.5,color='r')
ax.bar(2,5000,.5,color='b')
ax.bar(3,55000,.5,color='g')

fig.savefig("broken_log_demo.png")

Here is the plot with a PNG:

Looking back over the easy_install output it looks as if it does
download another tarball and try to build it. I read another thread
where this was happening to someone else.

I'll look at other libJPEGs - if that doesn't make it fly I might need
to take your other advice and nuke macpython. I'm a little hesitant
about over-writing the system installed numpy though.

Andrew

···

On Fri, Mar 21, 2008 at 10:13 AM, Christopher Barker <Chris.Barker@...259...> wrote:

> Compiling Matplotlib from source, or easy_installing the egg

>>From the egg:
> ld: in /sw/lib/libJPEG.dylib, file is not of required architecture for

hmm -- odd, I wouldn't think the egg should be linked against what looks
like a macports libJPEG -- are you sure it isn't trying to build the
egg when you easy_install?

I vaguely recall a bug whereby mathtext on PDF was upside down (because the direction of the y-axis was not being inverted)... but I can't find the bug report.

It does seem to work in 0.90.1 and 0.91.2 (on Linux at least). Are you able to upgrade?

Cheers,
Mike

Simson Garfinkel wrote:

···

Hi. I'm making scientific graphs again, so i just got back on this mailing list after a two year hiatus.

I am using:
matplotlib-0.90.0-py2.5-macosx-10.4-fat.egg

Here is a simple program:

#!/usr/bin/python
#
# Do our plots with matplotlib

import matplotlib
matplotlib.use('Agg')
from pylab import *

fig = figure(num=1,figsize=(6.5,4))
ax = fig.add_axes([.15,.3,.8,.65])
ax.set_title("Why is the Y axes upside down?")
ax.set_yscale('log')
ax.set_ylabel('Queries per second')

ax.bar(1,1000,.5,color='r')
ax.bar(2,5000,.5,color='b')
ax.bar(3,55000,.5,color='g')

fig.savefig("broken_log_demo.png")

Here is the plot with a PNG:

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

Well, that looks good.

But here is the plot when I change the type to PDF:

Notice the the axes are reversed.

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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
------------------------------------------------------------------------

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options
  
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

Andrew Charles wrote:

Looking back over the easy_install output it looks as if it does
download another tarball and try to build it. I read another thread
where this was happening to someone else.

What did you try to install? was it this:

matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg

which I think should work, so if it doesn't, maybe we can figure out why not. It worked for me with MacPython2.5 on OS-X 10.4

Charlie, am I right that that should work?

I'll look at other libJPEGs - if that doesn't make it fly I might need
to take your other advice and nuke macpython. I'm a little hesitant
about over-writing the system installed numpy though.

I agree. MacPython is a good way to go, and we should have a binary for it, so maybe we can solve this. I don't have Leopard, so I'm not sure I can help much though.

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

Hm.

On my Linux box, Well, easy_install should upgrade me to 91.2, but won't build because ft2build.h is missing...? Apparently that's part of freetype v2, which I have installed...

On my Mac, easy_install says that matplotlib 0.87.7 is the active version and the best version.

I guess I can't easy install...

02:46 PM t:/home/simsong# easy_install matplotlib
Searching for matplotlib
Reading Links for matplotlib
Reading http://matplotlib.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.91.2
Downloading Download matplotlib-0.91.2.tar.gz (matplotlib)
Processing matplotlib-0.91.2.tar.gz
Running matplotlib-0.91.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-YMu8YK/matplotlib-0.91.2/egg-dist-tmp-AOR3hR

···

On Mar 21, 2008, at 6:12 AM, Michael Droettboom wrote:

I vaguely recall a bug whereby mathtext on PDF was upside down (because the direction of the y-axis was not being inverted)... but I can't find the bug report.

It does seem to work in 0.90.1 and 0.91.2 (on Linux at least). Are you able to upgrade?

============================================================================
BUILDING MATPLOTLIB
             matplotlib: 0.91.2
                 python: 2.4.4 (#1, Oct 23 2006, 13:58:18) [GCC 4.1.1
                         20061011 (Red Hat 4.1.1-30)]
               platform: linux2

REQUIRED DEPENDENCIES
                  numpy: 1.0.3
              freetype2: found, but unknown version (no pkg-config)
                         * WARNING: Could not find 'freetype2' headers in any
                         * of '/usr/local/include', '/usr/include', '.',
                         * '/usr/local/include/freetype2',
                         * '/usr/include/freetype2', './freetype2'.

OPTIONAL BACKEND DEPENDENCIES
                 libpng: found, but unknown version (no pkg-config)
                         * Could not find 'libpng' headers in any of
                         * '/usr/local/include', '/usr/include', '.'
                Tkinter: no
                         * Tkinter present, but header files are not found.
                         * You may need to install development packages.
               wxPython: no
                         * WXAgg's accelerator requires `wx-config'. The
                         * `wx-config' executable could not be located in any
                         * directory of the PATH environment variable. If you
                         * want to build WXAgg, and wx-config is in some
                         * other location or has some other name, set the
                         * WX_CONFIG environment variable to the full path of
                         * the executable like so: export WX_CONFIG=/usr/lib
                         * /wxPython-2.6.1.0-gtk2-unicode/bin/wx-config
                   Gtk+: no
                         * pygtk present but import failed
                     Qt: Qt: 3.3.7, PyQt: 3.17
                    Qt4: no
                  Cairo: 1.2.6

OPTIONAL DATE/TIMEZONE DEPENDENCIES
               datetime: present, version unknown
               dateutil: present, version unknown
                   pytz: 2006p

OPTIONAL USETEX DEPENDENCIES
                 dvipng: 1.5
            ghostscript: 8.15.4
                  latex: 3.141592
                pdftops: 3.00

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

[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 'lib/matplotlib/toolkits'
no previously-included directories found matching 'examples/_tmp_*'
In file included from src/ft2font.cpp:2:
src/ft2font.h:11:22: error: ft2build.h: No such file or directory
src/ft2font.h:12:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:13:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:14:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:15:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:16:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:31: error: ‘FT_Bitmap’ has not been declared
src/ft2font.h:31: error: ‘FT_Int’ has not been declared
src/ft2font.h:75: error: expected ‘,’ or ‘...’ before ‘&’ token
src/ft2font.h:75: error: ISO C++ forbids declaration of ‘FT_Face’ with no type
src/ft2font.h:81: error: expected ‘,’ or ‘...’ before ‘&’ token
src/ft2font.h:81: error: ISO C++ forbids declaration of ‘FT_Face’ with no type
src/ft2font.h:121: error: ‘FT_Face’ does not name a type
src/ft2font.h:122: error: ‘FT_Matrix’ does not name a type
src/ft2font.h:123: error: ‘FT_Vector’ does not name a type
src/ft2font.h:124: error: ‘FT_Error’ does not name a type
src/ft2font.h:125: error: ‘FT_Glyph’ was not declared in this scope
src/ft2font.h:125: error: template argument 1 is invalid
src/ft2font.h:125: error: template argument 2 is invalid
src/ft2font.h:126: error: ‘FT_Vector’ was not declared in this scope
src/ft2font.h:126: error: template argument 1 is invalid
src/ft2font.h:126: error: template argument 2 is invalid
src/ft2font.h:133: error: ‘FT_BBox’ does not name a type
src/ft2font.cpp:43: error: ‘FT_Library’ does not name a type
src/ft2font.cpp:92: error: variable or field ‘draw_bitmap’ declared void
src/ft2font.cpp:92: error: ‘int FT2Image::draw_bitmap’ is not a static member of ‘class FT2Image’
src/ft2font.cpp:92: error: ‘FT_Bitmap’ was not declared in this scope
src/ft2font.cpp:92: error: ‘bitmap’ was not declared in this scope
src/ft2font.cpp:93: error: ‘FT_Int’ was not declared in this scope
src/ft2font.cpp:94: error: ‘FT_Int’ was not declared in this scope
src/ft2font.cpp:94: error: initializer expression list treated as compound expression
src/ft2font.cpp:94: error: expected ‘,’ or ‘;’ before ‘{’ token
error: Setup script exited with error: command 'gcc' 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 0xb806c8>> ignored
Exception exceptions.OSError: (2, 'No such file or directory', 'src/transforms.cpp') in <bound method CleanUpFile.__del__ of <setupext.CleanUpFile instance at 0xb7fb00>> ignored
Exception exceptions.OSError: (2, 'No such file or directory', 'src/backend_agg.cpp') in <bound method CleanUpFile.__del__ of <setupext.CleanUpFile instance at 0xb80560>> ignored
02:46 PM t:/home/simsong#

02:49 PM t:/home/simsong# yum list | grep -i freetype
freetype.i386 2.2.1-17.fc6 installed
freetype.x86_64 2.2.1-17.fc6 installed
freetype-demos.x86_64 2.2.1-17.fc6 updates
freetype-devel.i386 2.2.1-17.fc6 updates
freetype-devel.x86_64 2.2.1-17.fc6 updates
freetype1.x86_64 1.4-0.2.pre.fc6 extras
freetype1-devel.x86_64 1.4-0.2.pre.fc6 extras
freetype1-utils.x86_64 1.4-0.2.pre.fc6 extras
02:49 PM t:/home/simsong#

Yes it was the matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg I tried to
install. I've posted the entire easy_install output below. I'll let
the list know if i resolve the problem.

Andrew

···

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

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

Installed /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg
Processing dependencies for matplotlib==0.91.2
Searching for matplotlib==0.91.2
Reading http://pypi.python.org/simple/matplotlib/
Reading http://matplotlib.sourceforge.net
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.91.2
Downloading http://downloads.sourceforge.net/matplotlib/matplotlib-0.91.2.tar.gz?modtime=1199627250&big_mirror=0
Processing matplotlib-0.91.2.tar.gz
Running matplotlib-0.91.2/setup.py -q bdist_egg --dist-dir
/tmp/easy_install-QGmbAu/matplotlib-0.91.2/egg-dist-tmp-hsIe8R

BUILDING MATPLOTLIB
            matplotlib: 0.91.2
                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.0.5.dev4897
             freetype2: 9.16.3

OPTIONAL BACKEND DEPENDENCIES
                libpng: 1.2.24
               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: 8.57
                 latex: no

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

[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 'lib/matplotlib/toolkits'
no previously-included directories found matching 'examples/_tmp_*'
In file included from
/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h:8,
                 from ./CXX/WrapPython.h:47,
                 from ./CXX/Extensions.hxx:48,
                 from src/ft2font.h:18,
                 from src/ft2font.cpp:2:
/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/pyconfig.h:814:1:
warning: "SIZEOF_LONG" redefined
In file included from /usr/X11/include/freetype2/freetype/freetype.h:41,
                 from src/ft2font.h:12,
                 from src/ft2font.cpp:2:
/usr/X11/include/freetype2/freetype/config/ftconfig.h:65:1: warning:
this is the location of the previous definition
In file included from
/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h:8,
                 from ./CXX/WrapPython.h:47,
                 from ./CXX/Extensions.hxx:48,
                 from src/ft2font.h:18,
                 from src/ft2font.cpp:2:
/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/pyconfig.h:814:1:
warning: "SIZEOF_LONG" redefined
In file included from /usr/X11/include/freetype2/freetype/freetype.h:41,
                 from src/ft2font.h:12,
                 from src/ft2font.cpp:2:
/usr/X11/include/freetype2/freetype/config/ftconfig.h:65:1: warning:
this is the location of the previous definition
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:47,
                 from CXX/cxxextensions.c:38:
/usr/include/architecture/ppc/math.h:675: warning: conflicting types
for built-in function ‘scalb’
ld: in /sw/lib/libJPEG.dylib, file is not of required architecture for
architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccG9WQI9.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 0x1b5f4b8>> ignored
Exception exceptions.OSError: (2, 'No such file or directory',
'src/transforms.cpp') in <bound method CleanUpFile.__del__ of
<setupext.CleanUpFile instance at 0x1b5ccd8>> ignored
Exception exceptions.OSError: (2, 'No such file or directory',
'src/backend_agg.cpp') in <bound method CleanUpFile.__del__ of
<setupext.CleanUpFile instance at 0x1b5f030>> ignored

Hi. I've seen this problem before.

I think that you need to install freetype developer. The easiest way to install this is with macports and then type "port install freetype"

···

On Mar 21, 2008, at 9:50 PM, Andrew Charles wrote:

Yes it was the matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg I tried to
install. I've posted the entire easy_install output below. I'll let
the list know if i resolve the problem.

Andrew

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

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

Installed /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg
Processing dependencies for matplotlib==0.91.2
Searching for matplotlib==0.91.2
Reading Links for matplotlib
Reading http://matplotlib.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.91.2
Downloading Download matplotlib-0.91.2.tar.gz (matplotlib)
Processing matplotlib-0.91.2.tar.gz
Running matplotlib-0.91.2/setup.py -q bdist_egg --dist-dir
/tmp/easy_install-QGmbAu/matplotlib-0.91.2/egg-dist-tmp-hsIe8R

BUILDING MATPLOTLIB
           matplotlib: 0.91.2
               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.0.5.dev4897
            freetype2: 9.16.3

OPTIONAL BACKEND DEPENDENCIES
               libpng: 1.2.24
              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: 8.57
                latex: no

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

[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 'lib/matplotlib/toolkits'
no previously-included directories found matching 'examples/_tmp_*'
In file included from
/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h:8,
                from ./CXX/WrapPython.h:47,
                from ./CXX/Extensions.hxx:48,
                from src/ft2font.h:18,
                from src/ft2font.cpp:2:
/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/pyconfig.h:814:1:
warning: "SIZEOF_LONG" redefined
In file included from /usr/X11/include/freetype2/freetype/freetype.h:41,
                from src/ft2font.h:12,
                from src/ft2font.cpp:2:
/usr/X11/include/freetype2/freetype/config/ftconfig.h:65:1: warning:
this is the location of the previous definition
In file included from
/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h:8,
                from ./CXX/WrapPython.h:47,
                from ./CXX/Extensions.hxx:48,
                from src/ft2font.h:18,
                from src/ft2font.cpp:2:
/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/pyconfig.h:814:1:
warning: "SIZEOF_LONG" redefined
In file included from /usr/X11/include/freetype2/freetype/freetype.h:41,
                from src/ft2font.h:12,
                from src/ft2font.cpp:2:
/usr/X11/include/freetype2/freetype/config/ftconfig.h:65:1: warning:
this is the location of the previous definition
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:47,
                from CXX/cxxextensions.c:38:
/usr/include/architecture/ppc/math.h:675: warning: conflicting types
for built-in function ‘scalb’
ld: in /sw/lib/libJPEG.dylib, file is not of required architecture for
architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccG9WQI9.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 0x1b5f4b8>> ignored
Exception exceptions.OSError: (2, 'No such file or directory',
'src/transforms.cpp') in <bound method CleanUpFile.__del__ of
<setupext.CleanUpFile instance at 0x1b5ccd8>> ignored
Exception exceptions.OSError: (2, 'No such file or directory',
'src/backend_agg.cpp') in <bound method CleanUpFile.__del__ of
<setupext.CleanUpFile instance at 0x1b5f030>> ignored

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

I'm happy to report that the egg install is now working. Still not
able to get the source to compile but I can live with that.

The problem appears to be the fink versions of libJPEG and libTIFF.
When I removed /sw/libJPEG, the installation crashed with a similar
error on libTIFF. When I removed /sw/libTIFF (fink remove libTIFF)
the egg install (sudo easy_install
matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg) worked.

The last thing I had to do was change the ownership and permissions of
my ~/ .matplotlib from root to me, and simple plot commands are now
working.

Now, some people may need their fink /sw versions of libJPEG and
libTIFF - are there commands that you can pass to easy_install to
instruct it to link against the default installed libJPEG and
libTIFFs?

Cheers,

Andrew

Ah, if you are using /sw/, then you are using fink.
I pretty much gave up on fink a while ago and now use macports; if I can't install with macports, I install with source.
The reason that I gave up with fink is that it's largely a Linux-heritage thing, while macports is a BSD-heritage thing. MacOS is FreeBSD, not Linux.

YMMV

···

On Mar 23, 2008, at 3:53 AM, Andrew Charles wrote:

I'm happy to report that the egg install is now working. Still not
able to get the source to compile but I can live with that.

The problem appears to be the fink versions of libJPEG and libTIFF.
When I removed /sw/libJPEG, the installation crashed with a similar
error on libTIFF. When I removed /sw/libTIFF (fink remove libTIFF)
the egg install (sudo easy_install
matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg) worked.

The last thing I had to do was change the ownership and permissions of
my ~/ .matplotlib from root to me, and simple plot commands are now
working.

Now, some people may need their fink /sw versions of libJPEG and
libTIFF - are there commands that you can pass to easy_install to
instruct it to link against the default installed libJPEG and
libTIFFs?

Cheers,

Andrew

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Andrew Charles wrote:

Yes it was the matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg I tried to
install. I've posted the entire easy_install output below.

Thanks. First, a note:

There is confusion here. If I have it right, the OP is trying to install the BINARY egg that is up on sourceforge into the MacPython/Python.org Python2.5 running on OS-X 10.5. This should work. However:

Processing matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg

...

Installed /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg

So this looks like it has installed the binary egg.

Processing dependencies for matplotlib==0.91.2
Searching for matplotlib==0.91.2

But now it has determined that it has mpl 0.91.2 as a dependency, which is just plain odd -- I really don't get setuptools!

Processing matplotlib-0.91.2.tar.gz

so it has downloaded the tarball, and is trying to build it.

              wxPython: no
                        * wxPython not found

By the way I thought wxPython was only a run-time dependency now?

In file included from /usr/X11/include/freetype2/freetype/freetype.h:41,

some freetype warnings -- should it work with Apple-supplied freetype? it didn't used to , but it looks like these are only warnings now.

ld: in /sw/lib/libJPEG.dylib, file is not of required architecture for
architecture ppc

Now we've got a problem with a fink (or is it darwinports?) libJPEG, 'cause it's not Universal -- but why is it finding that libjpeg?

So:

1) Have you tried aborting when it starts downloading? Maybe the binary is installed?

2) Why is it trying to download and build from source? Does anyone get setuptools enough to know?

3) Maybe we should just distribute a binary *.mpkg instead. I've seen talk of a way to install a single binary that could work with either Apple's or MacPython's 2.5 -- I think it involved a symlink to a shared place to put packages -- anyone know if that actually works?

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

  1. Maybe we should just distribute a binary *.mpkg instead. I’ve seen

talk of a way to install a single binary that could work with either

Apple’s or MacPython’s 2.5 – I think it involved a symlink to a shared

place to put packages – anyone know if that actually works?

I agree on the mpkg, but the last few times I have tried bdist_mpkg it has died miserably on mpl.

  • Charlie

> Processing dependencies for matplotlib==0.91.2
> Searching for matplotlib==0.91.2

But now it has determined that it has mpl 0.91.2 as a dependency, which
is just plain odd -- I really don't get setuptools!

Me neither - but I just went with it.

> Processing matplotlib-0.91.2.tar.gz

so it has downloaded the tarball, and is trying to build it.

> wxPython: no
> * wxPython not found

By the way I thought wxPython was only a run-time dependency now?

It installed ok without WX, though i've since reinstalled with WX.

> In file included from /usr/X11/include/freetype2/freetype/freetype.h:41,

some freetype warnings -- should it work with Apple-supplied freetype?
it didn't used to , but it looks like these are only warnings now.

I've not yet tried to do anything clever with Tex or fonts, but it
seems to be working linked against the Apple supplied freetype.

> ld: in /sw/lib/libJPEG.dylib, file is not of required architecture for
> architecture ppc

Now we've got a problem with a fink (or is it darwinports?) libJPEG,
'cause it's not Universal -- but why is it finding that libjpeg?

Yes, the issue was with the fink libraries. Not sure why it was
picking those up first - might be the way my path is set up. It's
working now though - removing the fink libraries worked well enough.

3) Maybe we should just distribute a binary *.mpkg instead. I've seen
talk of a way to install a single binary that could work with either
Apple's or MacPython's 2.5 -- I think it involved a symlink to a shared
place to put packages -- anyone know if that actually works?

Sounds like a plan. Now that i have the use of this Mac I want to get
my research supervisor to install the whole kit of software that I
use, and the process so far has been moderately more trying than it
should be.

···

On Tue, Mar 25, 2008 at 4:45 AM, Christopher Barker <Chris.Barker@...259...> wrote:

-------------------------
Centre for Australian Weather and Climate,
Australian Bureau of Meteorology.
Condensed Matter Theory Group,
RMIT University.

To summarize where we are at with OS-X installer:

The binary egg that Charlie built is supposed to work with Python 2.5, either Apple or python.org version on OS-X 10.5, and pythonorg version on OS-X 10.3.9 and 10.4.*

However, for some odd reason none of us understand, under some circumstances, easy-install tries to build from source anyway.

We're not distributing it as a *.mpgk, 'cause bdist_mpgk doesn't work right the last time it was tried.

It would be great if someone could work out one or both of these issues, but it looks like none of us has the energy and/or time at the moment.

On the bright side, it looks like building from source is getting easier, with only libpng being a dependency not supplied by Apple (at least on 10.5). Which is odd -- libpng is really common!

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

Hi,

To summarize where we are at with OS-X installer:

The binary egg that Charlie built is supposed to work with Python 2.5,
either Apple or python.org version on OS-X 10.5, and pythonorg version
on OS-X 10.3.9 and 10.4.*

However, for some odd reason none of us understand, under some
circumstances, easy-install tries to build from source anyway.

[snip]

I haven't really been following this thread too closely, but I read through it and saw that no body made mention of the "superpack"?

http://trichech.us/?p=5

For a long while now, I've been using python2.4 through macports and installing ipython/numpy/scipy/matplotlib from SVN, but I wanted to just try to use Leopard's Python (quickly ;-).

Instead of installing everything from source, I took a stab at d/ling the superpack and it all worked out pretty well for me. The only thing I had to do was to install freetype2 from source (simple ./configure, make, sudo make install) and everything seems to be working. Once I had that in there, I could use matplotlib with the WXAgg backend and it required no additional tweaking.

You can give that a go and see if it works.

If the numpy/scipy versions fall sufficiently out of data w/o a re-release of the superpack, I reckon you can install those from SVN (and remove the installed eggs) and things should work out fine.

-steve

···

On Mar 25, 2008, at 12:23 PM, Christopher Barker wrote: