Tôi đang cố gắng cài đặt matplotlib cho các ứng dụng vẽ đồ họa trong Python trên Mac OS X. Khi tôi chạy "python setup.py install", nó cho tôi tải lỗi này: http://pastebin.com/u7fL37ic.Không thể cài đặt matplotlib trên Mac OS X
Một đoạn nhanh:
src/ft2font.cpp:2170: error: ‘FT_LOAD_TARGET_MONO’ was not declared in this scope
src/ft2font.cpp:2171: error: ‘FT_LOAD_TARGET_LCD’ was not declared in this scope
src/ft2font.cpp:2172: error: ‘FT_LOAD_TARGET_LCD_V’ was not declared in this scope
src/ft2font.cpp:2175: error: ‘_ft2Library’ was not declared in this scope
src/ft2font.cpp:2175: error: ‘FT_Init_FreeType’ was not declared in this scope
src/ft2font.cpp: In destructor ‘virtual ft2font_module::~ft2font_module()’:
src/ft2font.cpp:2186: error: ‘_ft2Library’ was not declared in this scope
src/ft2font.cpp:2186: error: ‘FT_Done_FreeType’ was not declared in this scope
lipo: can't figure out the architecture type of: /var/folders/Nj/Njnlp9qSF64sMESWcaDnk++++TI/-Tmp-//cchyYmM5.out
error: command 'gcc-4.0' failed with exit status 1
Tôi đã cài đặt freetype sử dụng MacPorts, và tôi nghĩ rằng sẽ khắc phục vấn đề, nhưng không có may mắn. Cung cấp cho tôi lỗi tương tự như trước đây. Có vẻ như không thể tìm thấy các tệp tin phù hợp đúng:
BUILDING MATPLOTLIB
matplotlib: 1.0.0
python: 2.6.5 (r265:79359, Mar 24 2010, 01:32:55) [GCC
4.0.1 (Apple Inc. build 5493)]
platform: darwin
REQUIRED DEPENDENCIES
numpy: 1.5.0
freetype2: found, but unknown version (no pkg-config)
* WARNING: Could not find 'freetype2' headers in any
* of '.', './freetype2'.
Tôi nên đặt các tập tin kiểu chữ để tìm thấy ở đâu? Ngay bây giờ, họ đang ở/opt/local/lib
Bất kỳ ý tưởng nào?
RIP John D. Hunter - tác giả của matplotlib. Rất buồn khi biết rằng anh đã qua đời. http://matplotlib.org/ – user391339