0

OS X Lion に matplotlib (+ numpy、pandas など) をインストールしようとしていますが、正しくビルドされていないようです。http://jholewinski.org/blog/installing-matplotlib-on-os-x-10-7-with-homebrew/の指示に従っていますが、そのような運はありません。

出力全体は非常に長いので、ここに投稿しました: http://pastebin.com/ab6E1AB2

重要なビット:

In file included from ./CXX/Python2/Extensions.hxx:52:
./CXX/Python2/Objects.hxx:1052:17: error: no matching function for call to
      '_PyComplex_FromCComplex'
            set(PyComplex_FromCComplex (v), true);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/complexobject.h:24:35: note: expanded from macro
      'PyComplex_FromCComplex'
#define PyComplex_FromCComplex(c) _PyComplex_FromCComplex(&c)
                                  ^~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/pypy_decl.h:488:24: note: candidate function not viable: 1st
      argument ('const Py_complex *' (aka 'const Py_complex_t *')) would lose
      const qualifier
PyAPI_FUNC(PyObject *) _PyComplex_FromCComplex(Py_complex *arg0);
                       ^
In file included from src/ft2font.cpp:3:
In file included from src/ft2font.h:6:
In file included from ./CXX/Extensions.hxx:40:
In file included from ./CXX/Python2/Extensions.hxx:52:
./CXX/Python2/Objects.hxx:2215:32: error: no matching function for call to
      'PyString_AsEncodedObject'
                return String( PyString_AsEncodedObject( ptr(), ...
                               ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/pypy_decl.h:363:24: note: candidate function not viable: 2nd
      argument ('const char *') would lose const qualifier
PyAPI_FUNC(PyObject *) PyString_AsEncodedObject(PyObject *arg0, char ...
                       ^
In file included from src/ft2font.cpp:3:
In file included from src/ft2font.h:6:
In file included from ./CXX/Extensions.hxx:40:
In file included from ./CXX/Python2/Extensions.hxx:52:
./CXX/Python2/Objects.hxx:2221:28: error: no matching function for call to
      'PyString_AsDecodedObject'
            return Object( PyString_AsDecodedObject( ptr(), encoding, ...
                           ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/pypy_decl.h:362:24: note: candidate function not viable: 2nd
      argument ('const char *') would lose const qualifier
PyAPI_FUNC(PyObject *) PyString_AsDecodedObject(PyObject *arg0, char ...
                       ^
In file included from src/ft2font.cpp:3:
In file included from src/ft2font.h:6:
In file included from ./CXX/Extensions.hxx:40:
In file included from ./CXX/Python2/Extensions.hxx:52:
./CXX/Python2/Objects.hxx:3311:12: error: use of undeclared identifier
      'PyNumber_Coerce'; did you mean 'PyNumber_Check'?
        if(PyNumber_Coerce(&p1,&p2) == -1)
           ^~~~~~~~~~~~~~~
           PyNumber_Check
/usr/local/include/pypy_decl.h:239:17: note: 'PyNumber_Check' declared here
PyAPI_FUNC(int) PyNumber_Check(PyObject *arg0);
                ^
In file included from src/ft2font.cpp:3:
In file included from src/ft2font.h:6:
In file included from ./CXX/Extensions.hxx:40:
In file included from ./CXX/Python2/Extensions.hxx:52:
./CXX/Python2/Objects.hxx:3311:32: error: too many arguments to function call,
      expected 1, have 2
        if(PyNumber_Coerce(&p1,&p2) == -1)
           ~~~~~~~~~~~~~~~     ^~~
/usr/local/include/pypy_decl.h:239:12: note: 'PyNumber_Check' declared here
PyAPI_FUNC(int) PyNumber_Check(PyObject *arg0);
           ^
/usr/local/include/Python.h:14:28: note: expanded from macro 'PyAPI_FUNC'
# define PyAPI_FUNC(RTYPE) RTYPE
                           ^
5 errors generated.
error: command '/usr/bin/clang' failed with exit status 1
4

1 に答える 1

0

PyPy を使用しているようですが、matplotlib はサポートされていません (少なくともまだ)。代わりに、デフォルトの python (CPython) を使用するとうまくいくでしょう。

于 2012-07-05T13:29:39.393 に答える