【发布时间】:2014-01-11 07:02:41
【问题描述】:
几天来,我一直在努力为 python 安装 matplotlib 库。我已经整理好了 freetype、XCode、X11 和绑定,但是现在当我尝试安装 matplotlib 时出现以下错误:
building 'matplotlib.backends._macosx' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -O2
-DNDEBUG -g -O3 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__macosx_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1 -I/Library/Frameworks/Python.framework/Versions/2.7/lib
/python2.7/site-packages/numpy/core/include -I/usr/local/include -I/usr/include
-I/usr/X11/include -I/opt/local/include -I. -Iagg24/include
-I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
-c src/_macosx.m
-o build/temp.macosx-10.6-intel-2.7/src/_macosx.o
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:161,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
from src/_macosx.m:1:
/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:16:
error: expected ‘,’ or ‘}’ before ‘__attribute__’
这伴随着一些关于已弃用的 numpy API 的警告,但这些似乎没有引起任何问题。谁能告诉我这是什么问题?
为了记录,我使用的是 gcc-4.2。
【问题讨论】:
标签: python macos matplotlib pip osx-mavericks