Problem compiling matplotlib from master

Hello,

Since I’ve updated my master branch, I have a new error when installing matplotlib. It seems it doesn’t find a header file from numpy:

I’ve reinstalled numpy (development version), and I tried to reinstall everything (on python 2.6) but I still get the error. Am I the only one having installation problems ?

Here is the (partial) traceback:

building ‘matplotlib._png’ extension

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include -I. -I/usr/include/libpng12 -I/usr/lib/pymodules/python2.6/numpy/core/include -I/usr/include/python2.6 -c src/_png.cpp -o build/temp.linux-x86_64-2.6/src/_png.o

In file included from src/_png.cpp:31:

src/file_compat.h:4:32: error: numpy/npy_3kcompat.h: No such file or directory

In file included from src/_png.cpp:31:

src/file_compat.h: In function ‘int npy_PyFile_CloseFile(PyObject*)’:

src/file_compat.h:125: warning: deprecated conversion from string constant to ‘char*’

src/_png.cpp: In member function ‘Py::Object _png_module::write_png(const Py::Tuple&)’:

src/_png.cpp:137: error: ‘npy_PyFile_OpenFile’ was not declared in this scope

src/_png.cpp:147: error: ‘npy_PyFile_Dup’ was not declared in this scope

src/_png.cpp:243: error: ‘npy_PyFile_DupClose’ was not declared in this scope

src/_png.cpp:264: error: ‘npy_PyFile_DupClose’ was not declared in this scope

src/_png.cpp: In member function ‘PyObject* _png_module::_read_png(const Py::Object&, bool, int)’:

src/_png.cpp:321: error: ‘npy_PyFile_OpenFile’ was not declared in this scope

src/_png.cpp:329: error: ‘npy_PyFile_Dup’ was not declared in this scope

src/_png.cpp:577: error: ‘npy_PyFile_DupClose’ was not declared in this scope

error: command ‘gcc’ failed with exit status 1

Thanks,

N

It thinks the Numpy header files are here:

/usr/lib/pymodules/python2.6/numpy/core/include

are they there and from the right version of Numpy?

When you run python (the same copy you're building with), and import numpy and print "numpy.__version__" does that give the expected version. What does "numpy.__file__" and "numpy.get_version()" give?

Mike

···

On 02/28/2013 11:24 AM, Nelle Varoquaux wrote:

Hello,

Since I've updated my master branch, I have a new error when installing matplotlib. It seems it doesn't find a header file from numpy:

I've reinstalled numpy (development version), and I tried to reinstall everything (on python 2.6) but I still get the error. Am I the only one having installation problems ?

Here is the (partial) traceback:

building 'matplotlib._png' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include -I. -I/usr/include/libpng12 -I/usr/lib/pymodules/python2.6/numpy/core/include -I/usr/include/python2.6 -c src/_png.cpp -o build/temp.linux-x86_64-2.6/src/_png.o
In file included from src/_png.cpp:31:
src/file_compat.h:4:32: error: numpy/npy_3kcompat.h: No such file or directory
In file included from src/_png.cpp:31:
src/file_compat.h: In function 'int npy_PyFile_CloseFile(PyObject*)':
src/file_compat.h:125: warning: deprecated conversion from string constant to 'char*'
src/_png.cpp: In member function 'Py::Object _png_module::write_png(const Py::Tuple&)':
src/_png.cpp:137: error: 'npy_PyFile_OpenFile' was not declared in this scope
src/_png.cpp:147: error: 'npy_PyFile_Dup' was not declared in this scope
src/_png.cpp:243: error: 'npy_PyFile_DupClose' was not declared in this scope
src/_png.cpp:264: error: 'npy_PyFile_DupClose' was not declared in this scope
src/_png.cpp: In member function 'PyObject* _png_module::_read_png(const Py::Object&, bool, int)':
src/_png.cpp:321: error: 'npy_PyFile_OpenFile' was not declared in this scope
src/_png.cpp:329: error: 'npy_PyFile_Dup' was not declared in this scope
src/_png.cpp:577: error: 'npy_PyFile_DupClose' was not declared in this scope
error: command 'gcc' failed with exit status 1

Thanks,
N

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb

_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

That's weird. Did you try installing a stable numpy version instead?
I tried compiling mpl against numpy 1.6.2 and everything worked out
fine.

···

On Thu, Feb 28, 2013 at 11:24 AM, Nelle Varoquaux <nelle.varoquaux@...149...> wrote:

Hello,

Since I've updated my master branch, I have a new error when installing
matplotlib. It seems it doesn't find a header file from numpy:

I've reinstalled numpy (development version), and I tried to reinstall
everything (on python 2.6) but I still get the error. Am I the only one
having installation problems ?

Here is the (partial) traceback:

building 'matplotlib._png' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -fPIC
-DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1
-I/usr/local/include -I/usr/include -I. -I/usr/include/libpng12
-I/usr/lib/pymodules/python2.6/numpy/core/include -I/usr/include/python2.6
-c src/_png.cpp -o build/temp.linux-x86_64-2.6/src/_png.o
In file included from src/_png.cpp:31:
src/file_compat.h:4:32: error: numpy/npy_3kcompat.h: No such file or
directory
In file included from src/_png.cpp:31:
src/file_compat.h: In function ‘int npy_PyFile_CloseFile(PyObject*)’:
src/file_compat.h:125: warning: deprecated conversion from string constant
to ‘char*’
src/_png.cpp: In member function ‘Py::Object _png_module::write_png(const
Py::Tuple&)’:
src/_png.cpp:137: error: ‘npy_PyFile_OpenFile’ was not declared in this
scope
src/_png.cpp:147: error: ‘npy_PyFile_Dup’ was not declared in this scope
src/_png.cpp:243: error: ‘npy_PyFile_DupClose’ was not declared in this
scope
src/_png.cpp:264: error: ‘npy_PyFile_DupClose’ was not declared in this
scope
src/_png.cpp: In member function ‘PyObject* _png_module::_read_png(const
Py::Object&, bool, int)’:
src/_png.cpp:321: error: ‘npy_PyFile_OpenFile’ was not declared in this
scope
src/_png.cpp:329: error: ‘npy_PyFile_Dup’ was not declared in this scope
src/_png.cpp:577: error: ‘npy_PyFile_DupClose’ was not declared in this
scope
error: command 'gcc' failed with exit status 1

Thanks,
N

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

--
Damon McDougall
http://www.damon-is-a-geek.com
Institute for Computational Engineering Sciences
201 E. 24th St.
Stop C0200
The University of Texas at Austin
Austin, TX 78712-1229

That's weird. Did you try installing a stable numpy version instead?
I tried compiling mpl against numpy 1.6.2 and everything worked out
fine.

I'm reinstalled everything, and it works fine. I still have problems when I
switch from an old branch (before the merge of the packaging changes) and
master, but I've resigned myself to destroy my virtualenv each time.

Thanks for the inputs !
N

···

--
Damon McDougall
http://www.damon-is-a-geek.com
Institute for Computational Engineering Sciences
201 E. 24th St.
Stop C0200
The University of Texas at Austin
Austin, TX 78712-1229

I often find that a `git clean -fxd` is enough, rather than blitzing my whole virtualenv.

···

On 03/01/2013 10:16 AM, Nelle Varoquaux wrote:

    That's weird. Did you try installing a stable numpy version instead?
    I tried compiling mpl against numpy 1.6.2 and everything worked out
    fine.

I'm reinstalled everything, and it works fine. I still have problems when I switch from an old branch (before the merge of the packaging changes) and master, but I've resigned myself to destroy my virtualenv each time.

Thanks for the inputs !
N

    --
    Damon McDougall
    http://www.damon-is-a-geek.com
    Institute for Computational Engineering Sciences
    201 E. 24th St.
    Stop C0200
    The University of Texas at Austin
    Austin, TX 78712-1229

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb

_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel