Install problems, OSX 10.6.8, Python 3.3.1

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.

Also tried building from source with python2.7 - same problem:

I deleted the old build/source directory, re-extracted the source from the
tar file and tried...
[lap3:~/matplotlib-1.2.1] pflm% sudo python2.7 setup.py install

Build runs ok except for some warnings like ...

warning: #warning "Using deprecated NumPy API, disable it by #defining
NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"

[macpflm:~] pflm% python2.7
Python 2.7.3 (default, Oct 22 2012, 06:12:28)
[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(24257) malloc: *** error for object 0x101d79820: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort

-Pierre

···

--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Install-problems-OSX-10-6-8-Python-3-3-1-tp41430p41468.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

Do any Mac experts have any ideas?

One thing that may help us is to fire this up in gdb and get a traceback.

1) Run "gdb python" (or "gdb python3").
2) At the gdb prompt, type "run"
3) At the Python prompt, type "import matplotlib.pyplot"
4) Python should crash, then type "bt" to get a backtrace
5) Post the *complete* backtrace to this list and maybe it will make the problem more obvious to us

Mike

···

On 07/08/2013 12:17 PM, p.maxted 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.

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

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.maxted@...4400...> 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.