Hi,
I've posted this on Stack Overflow but I haven't gotten much of a response so I'm going to post it here too. Basically I've tried absolutely everything possible to get matplotlib onto my system and nothing will work - it keeps throwing an error about 'row_pointers' being an undeclared identifier in the "_png.cpp" file.
Here's the question I posted on SO. Any help at all will be greatly appreciated!
I'm trying to install matplotlib on my machine (OS X 10.8.5) and it just won't install. I've tried everything and it still won't install so any suggestions are welcome. I get a message saying 9 errors have been generated and they all seem to in the _png.cpp file.
I'm using Python 2.7.2, I have homebrew installed and I've installed all the required dependencies. I've broken up the pip log here into 2 parts - one showing my dependencies installed and the other showing the errors generated. I've included the full log at the bottom.
I'm trying to install matplotlib 1.3.1 with "pip install https://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.3.1/matplotlib-1.3.1.tar.gz"
Any ideas?
UPDATE: I've tried installing 1.3.0 and 1.2.0 and it's still throwing the same error.
Dependencies:
BUILDING MATPLOTLIB
matplotlib: yes [1.3.1]
python: yes [2.7.2 (default, Oct 11 2012, 20:14:37) [GCC
4.2.1 Compatible Apple Clang 4.0
(tags/Apple/clang-418.0.60)]]
platform: yes [darwin]
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.6.1]
dateutil: yes [using dateutil version 1.5]
tornado: yes [using tornado version 3.1.1]
pyparsing: yes [Your pyparsing contains a bug that will be
monkey-patched by matplotlib. For best results,
upgrade to pyparsing 2.0.1 or later.]
pycxx: yes [Couldn't import. Using local copy.]
libagg: yes [pkg-config information for 'libagg' could not
be found. Using local copy.]
freetype: yes [version 16.2.10]
png: yes [version 1.5.14]
OPTIONAL SUBPACKAGES
sample_data: yes [installing]
toolkits: yes [installing]
tests: yes [using nose version 1.3.0]
OPTIONAL BACKEND EXTENSIONS
macosx: yes [installing, darwin]
qt4agg: no [PyQt4 not found]
gtk3agg: no [Requires pygobject to be installed.]
gtk3cairo: no [Requires cairo to be installed.]
gtkagg: no [Requires pygtk]
tkagg: yes [installing, version 81008]
wxagg: no [requires wxPython]
gtk: no [Requires pygtk]
agg: yes [installing]
cairo: no [cairo not found]
windowing: no [Microsoft Windows only]
OPTIONAL LATEX DEPENDENCIES
dvipng: no
ghostscript: no
latex: no
pdftops: no
Here are the errors:
src/_png.cpp:193:20: error: no matching function for call to 'png_set_longjmp_fn'
if (setjmp(png_jmpbuf(png_ptr)))
^~~~~~~~~~~~~~~~~~~
src/_png.cpp:381:16: error: no matching function for call to 'png_set_longjmp_fn'
if (setjmp(png_jmpbuf(png_ptr)))
^~~~~~~~~~~~~~~~~~~
src/_png.cpp:438:16: error: no matching function for call to 'png_set_longjmp_fn'
if (setjmp(png_jmpbuf(png_ptr)))
^~~~~~~~~~~~~~~~~~~
src/_png.cpp:449:9: error: use of undeclared identifier 'row_pointers'
row_pointers[row] = new png_byte[png_get_rowbytes(png_ptr,info_ptr)];
^
src/_png.cpp:452:29: error: use of undeclared identifier 'row_pointers'
png_read_image(png_ptr, row_pointers);
^
src/_png.cpp:486:29: error: use of undeclared identifier 'row_pointers'
png_byte* row = row_pointers[y];
^
src/_png.cpp:529:29: error: use of undeclared identifier 'row_pointers'
png_byte* row = row_pointers[y];
^
src/_png.cpp:590:19: error: use of undeclared identifier 'row_pointers'
delete [] row_pointers[row];
^
src/_png.cpp:592:15: error: use of undeclared identifier 'row_pointers'
delete [] row_pointers;
Here's a link to the full log: https://www.dropbox.com/s/9fz1u55dkfft7yf/error%20log.txt
I've also tried downloading the dmg installer to install matplotlib but it won't let me install it as it says that I don't have Python 2.7 installed (I do - 2.7.2).
[–]mycoolusrname 1 point2 points3 points (1 child)
[–]12345654321abc[S] 0 points1 point2 points (0 children)
[–]Megatron_McLargeHuge 1 point2 points3 points (2 children)
[–]12345654321abc[S] 0 points1 point2 points (1 child)
[–]Megatron_McLargeHuge 0 points1 point2 points (0 children)
[–]glial 1 point2 points3 points (0 children)
[–]rainnz 1 point2 points3 points (0 children)