2014-01-22 3 views
0

Я нахожусь на cygwin и с помощью easy_install для установки matplotlib. и я получаю вышеуказанную ошибку. До сих пор я подключил процесс установки. что происходит не так?установка matplotlib, ошибка: сценарий установки завершен с ошибкой: команда 'gcc' не сработала с статусом выхода 1

$ 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 
+2

[Это] (https://github.com/matplotlib/matplotlib/issues/2463) может помочь. – devnull

ответ

1

Ответ был здесь https://github.com/matplotlib/matplotlib/issues/2463

«Существует переменная называется„_C“определено в Lib/Matplotlib/тримарана/_tri.h на линии 821 и использоваться в tri.cpp на линиях 2180 и 2186. Для некоторых Причина gcc не нравится (это зарезервированное слово в некоторой архитектуре?). Я просто переименовал переменную в «_Co» в tri.h и tri.cpp, и компиляция завершилась успешно ».

1

Я рекомендую вам установить PythonXY, у вас будет почти ВСЕ, что вам нужно, или, по крайней мере, очень хорошие и известные библиотеки (включая matplotlib, numpy, scipy и многие другие). И он работает из коробки, не нужно искать зависимости.

Смежные вопросы

 Смежные вопросы