2010/10/4 Sanjay Kairam <sanjay.kai...@gmail.com>:
> Hi there,
>
> I'm having a problem installing matplotlib, I'm guessing that I am missing
> some dependency, but I am having trouble figuring out what the issue is (I
> don't have a ton of experience dealing with python libraries and
> troubleshooting install issues).
>
> I'm using Mac OSX 10.6.4 (Snow Leopard)
> I'm trying to install matplotlib 1.0.0, which I downloaded as a tar.gz file
> from the website.
>
> So, hopefully this won't be too annoying, but here is the full output from
> when I try to install the library - it is very possible that I am doing
> something really stupid, so please be nice! *Thanks so much* for any help
> that anyone can provide.
>
> Terminal Output:
> dnab434de2:matplotlib-1.0.0 skairam$ python setup.py install

> basedirlist is: []

Here is your issue.  Please check the archives of the matplotlib-users
list for the recent threads on compiling and Mac OS X (10.6 in
particular).

The thing is that the current distribution of matplotlib doesn't
include the library pathes on Max OS X, but it can be fixed with a
simple edit in setupext.py in the matplotlib/ directory.  This is
where you issue $python setup.py build.

You can try macports or similar, when you're not experienced with
building it's maybe more fast, but building freetype2 and libpng-1.4
is afaict quite straightforward.  I have no experience with macports,
but the include directory should be '/opt' instead of '/usr/local' in
that case I believe.  Sometimes people have problems with
architectures missing in the macports libraries.

There may be issues with compiler compatibility with the macports
libraries too, since Python is compiling gcc-4.0.  If they are
compiled gcc-4.2, they will fail to load into matplotlib's ft2font
Python extension.  There is unfortunately no way to tell with what
compiler a lib was built without having the logs available.  You can
in that case recompile Python with gcc-4.2, your numpy should still be
loadable then, or you compile freetype2 and libpng-1.4 with gcc-4.0
manually.  Please tell about your next steps on the list (push the
"answer to all" button ... :-)

I see you did not set MACOSX_DEPLOYMENT_TARGET.  Use $export
MACOSX_DEPLOYMENT_TARGET=10.5 or 10.6 even.  If you are not planning
to deploy Python .apps or similar to other systems you can safely use
10.6 as the value.  Not specifying any value defaults to 10.3 or sth
like that, very early, and you get a lot of warnings.

Ahh, another options to circumvent the edit of setupext.py, maybe a
quite good option, may be to install pkg-config.  This litte program
helps finding libraries.  But I have no experience with it.

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

Here you see that the libraries aren't found.

> gcc-4.0 -fno-strict-aliasing -fno-common -dynamic -arch ppc -arch i386 -g
> -O2 -DNDEBUG -g -O3 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
> -DPYCXX_ISO_CPP_LIB=1
> -I/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include
> -I.
> -I/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include/freetype2
> -I./freetype2
> -I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c
> src/ft2font.cpp -o build/temp.macosx-10.3-fat-2.6/src/ft2font.o
> In file included from /usr/include/architecture/i386/math.h:626,
>                  from /usr/include/math.h:28,
>                  from
> /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pyport.h:235,
>                  from
> /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:58,
>                  from ./CXX/WrapPython.h:61,
>                  from ./CXX/Extensions.hxx:37,
>                  from src/ft2font.h:4,
>                  from src/ft2font.cpp:1:
> /usr/include/AvailabilityMacros.h:108:14: warning: #warning Building for
> Intel with Mac OS X Deployment Target < 10.4 is invalid.

This kind of things occur without MACOSX_DEPLOYMENT_TARGET set.

> In file included from src/ft2font.cpp:1:
> src/ft2font.h:14:22: error: ft2build.h: No such file or directory

This is the error where all the other errors arise from.

The rest is just the compiler's way of bailing out ;-)

Friedrich

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to