0

I'm on cygwin and using easy_install to install matplotlib. and i get the above error. I have attached the installation process so far. what is going wrong?

 $ easy_install matplotlib
Searching for matplotlib
Reading http://pypi.python.org/simple/matplotlib/
Reading http://matplotlib.org
Reading http://matplotlib.sourceforge.net
Reading http://sourceforge.net/project/showfiles.php?group_id=80706
Reading http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474
Reading http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.0/
Reading http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.1/
Reading https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194
Reading https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.1/
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.3/
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0.1/
Best match: matplotlib 1.3.1
Downloading https://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.3.1/matplotlib-1.3.1.tar.gz
Processing matplotlib-1.3.1.tar.gz
Writing /tmp/easy_install-ocoQwv/matplotlib-1.3.1/setup.cfg
Running matplotlib-1.3.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ocoQwv/matplotlib-1.3.1/egg-dist-tmp-P_dVeG
============================================================================
Edit setup.cfg to change the build options

BUILDING MATPLOTLIB
            matplotlib: yes [1.3.1]
                python: yes [2.7.5 (default, Oct  2 2013, 22:34:09)  [GCC
                        4.8.1]]
              platform: yes [cygwin]

REQUIRED DEPENDENCIES AND EXTENSIONS
                 numpy: yes [version 1.6.2]
              dateutil: yes [dateutil was not found. It is required for date
                        axis support. pip/easy_install may attempt to
                        install it after matplotlib.]
               tornado: yes [using tornado version 3.2]
             pyparsing: yes [using pyparsing version 2.0.1]
                 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.1.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: no  [Mac OS-X only]
                qt4agg: yes [installing, Qt: 4.8.4, PyQt4: 4.10.2]
               gtk3agg: no  [Requires pygobject to be installed.]
             gtk3cairo: no  [Requires pygobject to be installed.]
                gtkagg: no  [The C/C++ header for pygtk (pygtk/pygtk.h)
                        could not be found.  You may need to install the
                        development package.]
                 tkagg: yes [installing, version 81008]
                 wxagg: no  [requires wxPython]
                   gtk: no  [The C/C++ header for pygtk (pygtk/pygtk.h)
                        could not be found.  You may need to install the
                        development package.]
                   agg: yes [installing]
                 cairo: yes [installing, version 1.10.0]
             windowing: no  [Microsoft Windows only]

OPTIONAL LATEX DEPENDENCIES
                dvipng: yes [version 1.14]
           ghostscript: yes [version 9.06]
                 latex: yes [version 3.1415926]
               pdftops: yes [version 0.22.5]

In file included from src/file_compat.h:4:0,
                 from src/_png.cpp:31:
/usr/lib/python2.7/site-packages/numpy/core/include/numpy/npy_3kcompat.h: In function ‘PyObject* npy_PyFile_OpenFile(PyObject*, char*)’:
/usr/lib/python2.7/site-packages/numpy/core/include/numpy/npy_3kcompat.h:258:60: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
     return PyObject_CallFunction(open, "Os", filename, mode);
                                                            ^
In file included from src/_png.cpp:31:0:
src/file_compat.h: In function ‘int npy_PyFile_CloseFile(PyObject*)’:
src/file_compat.h:125:50: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
     ret = PyObject_CallMethod(file, "close", NULL);
                                                  ^
src/_png.cpp: In function ‘void init_png()’:
src/_png.cpp:631:25: warning: variable ‘_png’ set but not used [-Wunused-but-set-variable]
     static _png_module* _png = NULL;
                         ^
In file included from src/file_compat.h:4:0,
                 from src/_png.cpp:31:
/usr/lib/python2.7/site-packages/numpy/core/include/numpy/npy_3kcompat.h: At global scope:
/usr/lib/python2.7/site-packages/numpy/core/include/numpy/npy_3kcompat.h:391:1: warning: ‘void simple_capsule_dtor(void*)’ defined but not used [-Wunused-function]
 simple_capsule_dtor(void *ptr)
 ^
src/_path.cpp: In function ‘void init_path()’:
src/_path.cpp:1759:26: warning: variable ‘_path’ set but not used [-Wunused-but-set-variable]
     static _path_module* _path = NULL;
                          ^
In file included from src/path_converters.h:10:0,
                 from src/path_cleanup.cpp:10:
agg24/include/agg_clip_liang_barsky.h: In function ‘void* get_path_iterator(PyObject*, PyObject*, int, int, double*, e_snap_mode, double, int, double, double, double)’:
agg24/include/agg_clip_liang_barsky.h:259:12: warning: ‘y1’ may be used uninitialized in this function [-Wmaybe-uninitialized]
            *x = (T)(double(bound - y1) * (x2 - x1) / (y2 - y1) + x1);
            ^
In file included from src/path_cleanup.cpp:10:0:
src/path_converters.h:440:28: note: ‘y1’ was declared here
         double x0, y0, x1, y1;
                            ^
In file included from src/path_converters.h:10:0,
                 from src/path_cleanup.cpp:10:
agg24/include/agg_clip_liang_barsky.h:62:39: warning: ‘x1’ may be used uninitialized in this function [-Wmaybe-uninitialized]
                ((y < clip_box.y1) << 3);
                                       ^
In file included from src/path_cleanup.cpp:10:0:
src/path_converters.h:440:24: note: ‘x1’ was declared here
         double x0, y0, x1, y1;
                        ^
In file included from src/path_converters.h:10:0,
                 from src/path_cleanup.cpp:10:
agg24/include/agg_clip_liang_barsky.h:259:12: warning: ‘y0’ may be used uninitialized in this function [-Wmaybe-uninitialized]
            *x = (T)(double(bound - y1) * (x2 - x1) / (y2 - y1) + x1);
            ^
In file included from src/path_cleanup.cpp:10:0:
src/path_converters.h:440:20: note: ‘y0’ was declared here
         double x0, y0, x1, y1;
                    ^
In file included from src/path_converters.h:10:0,
                 from src/path_cleanup.cpp:10:
agg24/include/agg_clip_liang_barsky.h:62:39: warning: ‘x0’ may be used uninitialized in this function [-Wmaybe-uninitialized]
                ((y < clip_box.y1) << 3);
                                       ^
In file included from src/path_cleanup.cpp:10:0:
src/path_converters.h:440:16: note: ‘x0’ was declared here
         double x0, y0, x1, y1;
                ^
In file included from /usr/include/python2.7/unicodeobject.h:57:0,
                 from /usr/include/python2.7/Python.h:85,
                 from ./CXX/WrapPython.h:58,
                 from ./CXX/Extensions.hxx:37,
                 from lib/matplotlib/tri/_tri.h:66,
                 from lib/matplotlib/tri/_tri.cpp:8:
lib/matplotlib/tri/_tri.h:821:33: error: expected unqualified-id before numeric constant
     const unsigned long _M, _A, _C;
                                 ^
lib/matplotlib/tri/_tri.cpp: In constructor ‘RandomNumberGenerator::RandomNumberGenerator(long unsigned int)’:
lib/matplotlib/tri/_tri.cpp:2180:28: error: expected identifier before numeric constant
     : _M(21870), _A(1291), _C(4621), _seed(seed % _M)
                            ^
lib/matplotlib/tri/_tri.cpp:2180:28: error: expected ‘{’ before numeric constant
lib/matplotlib/tri/_tri.cpp: At global scope:
lib/matplotlib/tri/_tri.cpp:2180:28: error: expected unqualified-id before numeric constant
error: Setup script exited with error: command 'gcc' failed with exit status 1
1
  • 2
    This might help. Commented Jan 22, 2014 at 14:04

3 Answers 3

1

I recommend you to install PythonXY, you will have almost ALL you need, or at least very good and well known libs (including matplotlib, numpy, scipy, and many others). And it works out of the box, no need to find dependencies.

Sign up to request clarification or add additional context in comments.

Comments

1

The answer was here https://github.com/matplotlib/matplotlib/issues/2463

"There is a variable called "_C" defined in lib/matplotlib/tri/_tri.h on line 821 and invoked in tri.cpp on lines 2180 and 2186. For some reason gcc doesn't like this (is it a reserved word in some architecture?). I just renamed the variable to "_Co" in both tri.h and tri.cpp, and the compilation finished successfully."

Comments

0

On Windows you can install Unofficial Windows Binaries for Python Extension Packages executables, no need to compile it.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.