I am able to import matplotlib.pyplt under python 3.3.2 from www.python.org in OS X 10.6.8. matplotlib 1.2.1, libfreetype and libpng were built from source using gcc 4.2.1 from Xcode 3.2.6. Are you using python from macports or from www.python.org? You might try using python from the installer at www.python.org and building libfreetype and libpng from source. I did a simple
./configure make sudo make install in the libfreetype and libpng source directories. You can download the latest source from http://sourceforge.net/projects/libpng/files/libpng16/1.6.2/ http://sourceforge.net/projects/freetype/files/freetype2/2.5.0/ hth, Scott On Jul 8, 2013, at 12:17 PM, p.maxted <p.max...@keele.ac.uk> wrote: > Trying to install matplotlib-1.2.1 from source, i.e., > > [macpflm:~/matplotlib-1.2.1] pflm% python3 setup.py install > > Everything seems to run ok, but I cannot import macplotlib: > > [macpflm:~] pflm% python3 > Python 3.3.1 (v3.3.1:d9893d13c628, Apr 6 2013, 11:07:11) > [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin > Type "help", "copyright", "credits" or "license" for more information. >>>> import matplotlib.pyplot > Python(16295) malloc: *** error for object 0x101c86820: pointer being freed > was not allocated > *** set a breakpoint in malloc_error_break to debug > Abort > > > I tried updating libpng and freetype using macports and re-building, it did > not solve the problem. > > There are some warnings printed during the build, e.g., > > ld: warning: in /opt/local/lib/libfreetype.dylib, file was built for > unsupported file format which is not the architecture being linked (i386) > ld: warning: in /opt/local/lib/libz.dylib, file was built for unsupported > file format which is not the architecture being linked (i386) > ld: warning: in > /Developer/SDKs/MacOSX10.6.sdk/usr/local/lib/libstdc++.dylib, file was built > for unsupported file format which is not the architecture being linked > (i386) > > ..and.. > > /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2: > warning: #warning "Using deprecated NumPy API, disable it by #defining > NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" > > (both warning several times). > > Some details from the start of the screen output during the build. > basedirlist is: ['/usr/local/', '/usr', '/usr/X11', '/opt/local'] > ============================================================================ > BUILDING MATPLOTLIB > matplotlib: 1.2.1 > python: 3.3.1 (v3.3.1:d9893d13c628, Apr 6 2013, 11:07:11) > [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] > platform: darwin > > REQUIRED DEPENDENCIES > numpy: 1.7.0 > freetype2: 16.2.10 > > OPTIONAL BACKEND DEPENDENCIES > libpng: 1.5.16 > Tkinter: Tkinter: version not identified, Tk: 8.5, Tcl: 8.5 > Gtk+: no > * Building for Gtk+ requires pygtk; you must be able > * to "import gtk" in your build/install environment > Mac OS X native: yes > Qt: no > Qt4: no > PySide: no > Cairo: no > > OPTIONAL DATE/TIMEZONE DEPENDENCIES > dateutil: matplotlib will provide > pytz: matplotlib will provide > six: matplotlib will provide > > OPTIONAL USETEX DEPENDENCIES > dvipng: 1.5 > ghostscript: 6.01 > latex: 3.141592 > > [Edit setup.cfg to suppress the above messages] > ============================================================================ > > Help! > > > -- > View this message in context: > http://matplotlib.1069221.n5.nabble.com/Install-problems-OSX-10-6-8-Python-3-3-1-tp41430.html > Sent from the matplotlib - users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users