macosx lion installation challenges

Hi

Hi,

I am having troubles getting matplotlib to install. I have mac os X lion with Xcode 4.2.1 installed and I have used git to get the latest version of matplotlib. I am also running python 2.7.2 from the python.org site. The installation process was going fine based on the make.osx file supplied . The only thing I had to do was add a symbolic link to map gcc-4.2 to gcc to get it to compile, the I hit the following problem:

gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I. -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/freetype2 -I./freetype2 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/ft2font.cpp -o build/temp.macosx-10.6-intel-2.7/src/ft2font.o
In file included from src/ft2font.cpp:3:
src/ft2font.h:16:22: error: ft2build.h: No such file or directory
src/ft2font.h:17:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:18:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:19:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:20:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:21:10: error: #include expects "FILENAME" or <FILENAME>
In file included from src/ft2font.cpp:3:
src/ft2font.h:34: error: ‘FT_Bitmap’ has not been declared
src/ft2font.h:34: error: ‘FT_Int’ has not been declared
src/ft2font.h:34: error: ‘FT_Int’ has not been declared
src/ft2font.h:86: error: expected ‘,’ or ‘...’ before ‘&’ token
src/ft2font.h:86: error: ISO C++ forbids declaration of ‘FT_Face’ with no type
src/ft2font.h:131: error: ‘FT_Face’ does not name a type
src/ft2font.h:132: error: ‘FT_Matrix’ does not name a type
src/ft2font.h:133: error: ‘FT_Vector’ does not name a type
src/ft2font.h:134: error: ‘FT_Error’ does not name a type
src/ft2font.h:135: error: ‘FT_Glyph’ was not declared in this scope
src/ft2font.h:135: error: template argument 1 is invalid
src/ft2font.h:135: error: template argument 2 is invalid
src/ft2font.h:136: error: ‘FT_Vector’ was not declared in this scope
src/ft2font.h:136: error: template argument 1 is invalid
src/ft2font.h:136: error: template argument 2 is invalid
src/ft2font.h:141: error: ‘FT_BBox’ does not name a type
src/ft2font.cpp:51: error: ‘FT_Library’ does not name a type
src/ft2font.cpp:116: error: variable or field ‘draw_bitmap’ declared void
src/ft2font.cpp:116: error: ‘FT_Bitmap’ was not declared in this scope
src/ft2font.cpp:116: error: ‘bitmap’ was not declared in this scope
src/ft2font.cpp:117: error: ‘FT_Int’ was not declared in this scope
src/ft2font.cpp:118: error: ‘FT_Int’ was not declared in this scope
In file included from src/ft2font.cpp:3:
src/ft2font.h:16:22: error: ft2build.h: No such file or directory
src/ft2font.h:17:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:18:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:19:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:20:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:21:10: error: #include expects "FILENAME" or <FILENAME>
In file included from src/ft2font.cpp:3:
src/ft2font.h:34: error: ‘FT_Bitmap’ has not been declared
src/ft2font.h:34: error: ‘FT_Int’ has not been declared
src/ft2font.h:34: error: ‘FT_Int’ has not been declared
src/ft2font.h:86: error: expected ‘,’ or ‘...’ before ‘&’ token
src/ft2font.h:86: error: ISO C++ forbids declaration of ‘FT_Face’ with no type
src/ft2font.h:131: error: ‘FT_Face’ does not name a type
src/ft2font.h:132: error: ‘FT_Matrix’ does not name a type
src/ft2font.h:133: error: ‘FT_Vector’ does not name a type
src/ft2font.h:134: error: ‘FT_Error’ does not name a type
src/ft2font.h:135: error: ‘FT_Glyph’ was not declared in this scope
src/ft2font.h:135: error: template argument 1 is invalid
src/ft2font.h:135: error: template argument 2 is invalid
src/ft2font.h:136: error: ‘FT_Vector’ was not declared in this scope
src/ft2font.h:136: error: template argument 1 is invalid
src/ft2font.h:136: error: template argument 2 is invalid
src/ft2font.h:141: error: ‘FT_BBox’ does not name a type
src/ft2font.cpp:51: error: ‘FT_Library’ does not name a type
src/ft2font.cpp:116: error: variable or field ‘draw_bitmap’ declared void
src/ft2font.cpp:116: error: ‘FT_Bitmap’ was not declared in this scope
src/ft2font.cpp:116: error: ‘bitmap’ was not declared in this scope
src/ft2font.cpp:117: error: ‘FT_Int’ was not declared in this scope
src/ft2font.cpp:118: error: ‘FT_Int’ was not declared in this scope
lipo: can't figure out the architecture type of: /var/folders/2d/t8xdmbdj103bmcjbm72j49980000gp/T//ccOY6Ibr.out
error: command 'gcc-4.2' failed with exit status 1

Any thoughts on how to fix it?

thanks, Andrew

You can also install the Enthought Python Distribution (EPD
http://enthought.com/products/epd.php). It comes with everything
(NumPy, Matplotlib, IPython, etc) and it is very easy to install on a
Mac.

- Ivan

···

--
Ivan Lima
Woods Hole Oceanographic Institution, MC&G MS #25
360 Woods Hole Road, Woods Hole, MA 02543-1543 USA

On Fri, Jan 13, 2012 at 21:41, Andrew <andrew_inbox@...9...> wrote:

Hi

Hi,

I am having troubles getting matplotlib to install. I have mac os X lion with Xcode 4.2.1 installed and I have used git to get the latest version of matplotlib. I am also running python 2.7.2 from the python.org site. The installation process was going fine based on the make.osx file supplied . The only thing I had to do was add a symbolic link to map gcc-4.2 to gcc to get it to compile, the I hit the following problem:

gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I. -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/freetype2 -I./freetype2 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/ft2font.cpp -o build/temp.macosx-10.6-intel-2.7/src/ft2font.o
In file included from src/ft2font.cpp:3:
src/ft2font.h:16:22: error: ft2build.h: No such file or directory
src/ft2font.h:17:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:18:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:19:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:20:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:21:10: error: #include expects "FILENAME" or <FILENAME>
In file included from src/ft2font.cpp:3:
src/ft2font.h:34: error: ‘FT_Bitmap’ has not been declared
src/ft2font.h:34: error: ‘FT_Int’ has not been declared
src/ft2font.h:34: error: ‘FT_Int’ has not been declared
src/ft2font.h:86: error: expected ‘,’ or ‘...’ before ‘&’ token
src/ft2font.h:86: error: ISO C++ forbids declaration of ‘FT_Face’ with no type
src/ft2font.h:131: error: ‘FT_Face’ does not name a type
src/ft2font.h:132: error: ‘FT_Matrix’ does not name a type
src/ft2font.h:133: error: ‘FT_Vector’ does not name a type
src/ft2font.h:134: error: ‘FT_Error’ does not name a type
src/ft2font.h:135: error: ‘FT_Glyph’ was not declared in this scope
src/ft2font.h:135: error: template argument 1 is invalid
src/ft2font.h:135: error: template argument 2 is invalid
src/ft2font.h:136: error: ‘FT_Vector’ was not declared in this scope
src/ft2font.h:136: error: template argument 1 is invalid
src/ft2font.h:136: error: template argument 2 is invalid
src/ft2font.h:141: error: ‘FT_BBox’ does not name a type
src/ft2font.cpp:51: error: ‘FT_Library’ does not name a type
src/ft2font.cpp:116: error: variable or field ‘draw_bitmap’ declared void
src/ft2font.cpp:116: error: ‘FT_Bitmap’ was not declared in this scope
src/ft2font.cpp:116: error: ‘bitmap’ was not declared in this scope
src/ft2font.cpp:117: error: ‘FT_Int’ was not declared in this scope
src/ft2font.cpp:118: error: ‘FT_Int’ was not declared in this scope
In file included from src/ft2font.cpp:3:
src/ft2font.h:16:22: error: ft2build.h: No such file or directory
src/ft2font.h:17:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:18:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:19:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:20:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:21:10: error: #include expects "FILENAME" or <FILENAME>
In file included from src/ft2font.cpp:3:
src/ft2font.h:34: error: ‘FT_Bitmap’ has not been declared
src/ft2font.h:34: error: ‘FT_Int’ has not been declared
src/ft2font.h:34: error: ‘FT_Int’ has not been declared
src/ft2font.h:86: error: expected ‘,’ or ‘...’ before ‘&’ token
src/ft2font.h:86: error: ISO C++ forbids declaration of ‘FT_Face’ with no type
src/ft2font.h:131: error: ‘FT_Face’ does not name a type
src/ft2font.h:132: error: ‘FT_Matrix’ does not name a type
src/ft2font.h:133: error: ‘FT_Vector’ does not name a type
src/ft2font.h:134: error: ‘FT_Error’ does not name a type
src/ft2font.h:135: error: ‘FT_Glyph’ was not declared in this scope
src/ft2font.h:135: error: template argument 1 is invalid
src/ft2font.h:135: error: template argument 2 is invalid
src/ft2font.h:136: error: ‘FT_Vector’ was not declared in this scope
src/ft2font.h:136: error: template argument 1 is invalid
src/ft2font.h:136: error: template argument 2 is invalid
src/ft2font.h:141: error: ‘FT_BBox’ does not name a type
src/ft2font.cpp:51: error: ‘FT_Library’ does not name a type
src/ft2font.cpp:116: error: variable or field ‘draw_bitmap’ declared void
src/ft2font.cpp:116: error: ‘FT_Bitmap’ was not declared in this scope
src/ft2font.cpp:116: error: ‘bitmap’ was not declared in this scope
src/ft2font.cpp:117: error: ‘FT_Int’ was not declared in this scope
src/ft2font.cpp:118: error: ‘FT_Int’ was not declared in this scope
lipo: can't figure out the architecture type of: /var/folders/2d/t8xdmbdj103bmcjbm72j49980000gp/T//ccOY6Ibr.out
error: command 'gcc-4.2' failed with exit status 1

Any thoughts on how to fix it?

thanks, Andrew
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

You can also install the Enthought Python Distribution (EPD
http://enthought.com/products/epd.php). It comes with everything
(NumPy, Matplotlib, IPython, etc) and it is very easy to install on a
Mac.

- Ivan
--
Ivan Lima
Woods Hole Oceanographic Institution, MC&G MS #25
360 Woods Hole Road, Woods Hole, MA 02543-1543 USA

Another relatively painless option is macports (http://macports.org), which has matplotlib-1.1.0 and basemap-1.0.2. For me it was as simple as

sudo port install py27-matplotlib

-Jeff

···

On 2/1/12 7:11 AM, Ivan Lima wrote:

On Fri, Jan 13, 2012 at 21:41, Andrew<andrew_inbox@...9...> wrote:

Hi

Hi,

I am having troubles getting matplotlib to install. I have mac os X lion with Xcode 4.2.1 installed and I have used git to get the latest version of matplotlib. I am also running python 2.7.2 from the python.org site. The installation process was going fine based on the make.osx file supplied . The only thing I had to do was add a symbolic link to map gcc-4.2 to gcc to get it to compile, the I hit the following problem:

gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I. -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/freetype2 -I./freetype2 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/ft2font.cpp -o build/temp.macosx-10.6-intel-2.7/src/ft2font.o
In file included from src/ft2font.cpp:3:
src/ft2font.h:16:22: error: ft2build.h: No such file or directory
src/ft2font.h:17:10: error: #include expects "FILENAME" or<FILENAME>
src/ft2font.h:18:10: error: #include expects "FILENAME" or<FILENAME>
src/ft2font.h:19:10: error: #include expects "FILENAME" or<FILENAME>
src/ft2font.h:20:10: error: #include expects "FILENAME" or<FILENAME>
src/ft2font.h:21:10: error: #include expects "FILENAME" or<FILENAME>
In file included from src/ft2font.cpp:3:
src/ft2font.h:34: error: ‘FT_Bitmap’ has not been declared
src/ft2font.h:34: error: ‘FT_Int’ has not been declared
src/ft2font.h:86: error: expected ‘,’ or ‘...’ before ‘&’ token
src/ft2font.h:86: error: ISO C++ forbids declaration of ‘FT_Face’ with no type
src/ft2font.h:131: error: ‘FT_Face’ does not name a type
src/ft2font.h:132: error: ‘FT_Matrix’ does not name a type
src/ft2font.h:133: error: ‘FT_Vector’ does not name a type
src/ft2font.h:134: error: ‘FT_Error’ does not name a type
src/ft2font.h:135: error: ‘FT_Glyph’ was not declared in this scope
src/ft2font.h:135: error: template argument 1 is invalid
src/ft2font.h:135: error: template argument 2 is invalid
src/ft2font.h:136: error: ‘FT_Vector’ was not declared in this scope
src/ft2font.h:136: error: template argument 1 is invalid
src/ft2font.h:136: error: template argument 2 is invalid
src/ft2font.h:141: error: ‘FT_BBox’ does not name a type
src/ft2font.cpp:51: error: ‘FT_Library’ does not name a type
src/ft2font.cpp:116: error: variable or field ‘draw_bitmap’ declared void
src/ft2font.cpp:116: error: ‘FT_Bitmap’ was not declared in this scope
src/ft2font.cpp:116: error: ‘bitmap’ was not declared in this scope
src/ft2font.cpp:117: error: ‘FT_Int’ was not declared in this scope
src/ft2font.cpp:118: error: ‘FT_Int’ was not declared in this scope
In file included from src/ft2font.cpp:3:
src/ft2font.h:16:22: error: ft2build.h: No such file or directory
src/ft2font.h:17:10: error: #include expects "FILENAME" or<FILENAME>
src/ft2font.h:18:10: error: #include expects "FILENAME" or<FILENAME>
src/ft2font.h:19:10: error: #include expects "FILENAME" or<FILENAME>
src/ft2font.h:20:10: error: #include expects "FILENAME" or<FILENAME>
src/ft2font.h:21:10: error: #include expects "FILENAME" or<FILENAME>
In file included from src/ft2font.cpp:3:
src/ft2font.h:34: error: ‘FT_Bitmap’ has not been declared
src/ft2font.h:34: error: ‘FT_Int’ has not been declared
src/ft2font.h:86: error: expected ‘,’ or ‘...’ before ‘&’ token
src/ft2font.h:86: error: ISO C++ forbids declaration of ‘FT_Face’ with no type
src/ft2font.h:131: error: ‘FT_Face’ does not name a type
src/ft2font.h:132: error: ‘FT_Matrix’ does not name a type
src/ft2font.h:133: error: ‘FT_Vector’ does not name a type
src/ft2font.h:134: error: ‘FT_Error’ does not name a type
src/ft2font.h:135: error: ‘FT_Glyph’ was not declared in this scope
src/ft2font.h:135: error: template argument 1 is invalid
src/ft2font.h:135: error: template argument 2 is invalid
src/ft2font.h:136: error: ‘FT_Vector’ was not declared in this scope
src/ft2font.h:136: error: template argument 1 is invalid
src/ft2font.h:136: error: template argument 2 is invalid
src/ft2font.h:141: error: ‘FT_BBox’ does not name a type
src/ft2font.cpp:51: error: ‘FT_Library’ does not name a type
src/ft2font.cpp:116: error: variable or field ‘draw_bitmap’ declared void
src/ft2font.cpp:116: error: ‘FT_Bitmap’ was not declared in this scope
src/ft2font.cpp:116: error: ‘bitmap’ was not declared in this scope
src/ft2font.cpp:117: error: ‘FT_Int’ was not declared in this scope
src/ft2font.cpp:118: error: ‘FT_Int’ was not declared in this scope
lipo: can't figure out the architecture type of: /var/folders/2d/t8xdmbdj103bmcjbm72j49980000gp/T//ccOY6Ibr.out
error: command 'gcc-4.2' failed with exit status 1

Any thoughts on how to fix it?

thanks, Andrew
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg

I am having troubles getting matplotlib to install. I have mac os X lion with Xcode 4.2.1 installed and I have used git to get the latest version of matplotlib. I am also running python 2.7.2 from the python.org site. The installation process was going fine based on the make.osx file supplied . The only thing I had to do was add a symbolic link to map gcc-4.2 to gcc to get it to compile, the I hit the following problem:

So what do you mean precisely by “the installation process was going fine” if you hit that complile error? So it did’t go fine AISI, no?

In file included from src/ft2font.cpp:3:
src/ft2font.h:16:22: error: ft2build.h: No such file or directory

AFAIR this means it did’t find the freetype2 installation sources. Either it’s some mistake in make.osx or you did one. Can’t say anything emphatically at this stage. Normally the make.osx installs the freetype2 somewhere.

src/ft2font.h:17:10: error: #include expects “FILENAME” or

You could have a look which include that is. I don’t have the sources here.

Sorry for the slow reply.

Friedrich