Bonjour,
Je suis sous RHEL5 et en python 2.7 et gtk+ 2.24.
J'essaye d'installer matplotlib 1.0.1 à partir des sources (fichier tar.gz) et j'ai l'erreur suivante :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
============================================================================
BUILDING MATPLOTLIB
            matplotlib: 1.0.1
                python: 2.7.1 (r271:86832, Jun 15 2011, 17:19:44)  [GCC
                        3.4.6 20060404 (Red Hat 3.4.6-3)]
              platform: linux2
 
REQUIRED DEPENDENCIES
                 numpy: 1.6.1
             freetype2: 9.15.3
 
OPTIONAL BACKEND DEPENDENCIES
                libpng: 1.5.2
                  Gtk+: gtk+: 2.22.1, glib: 2.25.10, pygtk: 2.24.0,
                        pygobject: 2.21.5
                    Qt: no
                   Qt4: no
                 Cairo: 1.10.0
 
OPTIONAL DATE/TIMEZONE DEPENDENCIES
              datetime: present, version unknown
              dateutil: matplotlib will provide
                  pytz: matplotlib will provide
adding pytz
 
OPTIONAL USETEX DEPENDENCIES
                dvipng: no
           ghostscript: 7.07
                 latex: 3.14159
               pdftops: 3.00
 
[Edit setup.cfg to suppress the above messages]
============================================================================
pymods ['pylab']
packages ['matplotlib', 'matplotlib.backends', 'matplotlib.backends.qt4_editor', 'matplotlib.projections', 'matplotlib.testing', 'matplotlib.testing.jpl_units', 'matplotlib.tests', 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 'mpl_toolkits.axes_grid1', 'mpl_toolkits.axisartist', 'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', 'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', 'matplotlib.tri', 'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil/zoneinfo']
running install
running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.linux-i686-2.7/matplotlib/mpl-data
copying lib/matplotlib/mpl-data/matplotlib.conf -> build/lib.linux-i686-2.7/matplotlib/mpl-data
running build_ext
building 'matplotlib._png' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/opt/IPASTEST/include/libpng15 -I/opt/IPASTEST/include -I. -I/opt/IPASTEST/lib/python2.7/site-packages/numpy/core/include -I. -I/opt/IPASTEST/include/python2.7 -c src/_png.cpp -o build/temp.linux-i686-2.7/src/_png.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
src/_png.cpp: In member function `Py::Object _png_module::read_png(const Py::Tuple&)':
src/_png.cpp:353: error: invalid use of undefined type `struct png_info_def'
/opt/IPASTEST/include/libpng15/png.h:674: error: forward declaration of `struct png_info_def'
src/_png.cpp:354: error: invalid use of undefined type `struct png_info_def'
/opt/IPASTEST/include/libpng15/png.h:674: error: forward declaration of `struct png_info_def'
src/_png.cpp:356: error: invalid use of undefined type `struct png_info_def'
/opt/IPASTEST/include/libpng15/png.h:674: error: forward declaration of `struct png_info_def'
src/_png.cpp:364: error: invalid use of undefined type `struct png_info_def'
/opt/IPASTEST/include/libpng15/png.h:674: error: forward declaration of `struct png_info_def'
src/_png.cpp:377: error: invalid use of undefined type `struct png_info_def'
/opt/IPASTEST/include/libpng15/png.h:674: error: forward declaration of `struct png_info_def'
src/_png.cpp:383: error: invalid use of undefined type `struct png_info_def'
/opt/IPASTEST/include/libpng15/png.h:674: error: forward declaration of `struct png_info_def'
src/_png.cpp:411: error: invalid use of undefined type `struct png_info_def'
/opt/IPASTEST/include/libpng15/png.h:674: error: forward declaration of `struct png_info_def'
src/_png.cpp:415: error: invalid use of undefined type `struct png_info_def'
/opt/IPASTEST/include/libpng15/png.h:674: error: forward declaration of `struct png_info_def'
src/_png.cpp:424: error: invalid use of undefined type `struct png_info_def'
/opt/IPASTEST/include/libpng15/png.h:674: error: forward declaration of `struct png_info_def'
error: command 'gcc' failed with exit status 1
J'ai bien toutes les dépendances demandées (avec les bonnes versions).
Je ne sais pas trop quoi faire.
J'ai vérifié mes variables d'environnement :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
[root@linux site-packages]# echo $LD_LIBRARY_PATH
/opt/IPASTEST/lib/python2.7/site-packages/gtk-2.0:/opt/IPASTEST/lib:lib:/usr/local/lib:/oracle/oracle10
[root@linux site-packages]# echo $PYTHONPATH
/opt/IPASTEST/lib/python2.7/site-packages
merci de votre aide