स्थापित करते समय त्रुटि मैंने मैक ओएस 10.7 के लिए the installation faq में वर्णित pip install matplotlib
और git clone
python setup.py install
का उपयोग करने का प्रयास किया है।matplotlib
[...]
llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include -I. -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/freetype2 -I./freetype2 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/ft2font.cpp -o build/temp.macosx-10.7-intel-2.7/src/ft2font.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
In file included from src/ft2font.cpp:3:
src/ft2font.h:16:22: error: ft2build.h: No such file or directory
src/ft2font.h:17:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:18:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:19:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:20:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:21:10: error: #include expects "FILENAME" or <FILENAME>
In file included from src/ft2font.cpp:3:
src/ft2font.h:34: error: ‘FT_Bitmap’ has not been declared
src/ft2font.h:34: error: ‘FT_Int’ has not been declared
src/ft2font.h:34: error: ‘FT_Int’ has not been declared
src/ft2font.h:86: error: expected ‘,’ or ‘...’ before ‘&’ token
[...]
ऐसा लगता है कि मैं कुछ पैकेज अपने सिस्टम में स्थापित याद कर रहा हूँ: लेकिन मैं एक ही त्रुटि मिलती है? या matplotlib स्थापित करने के लिए कोई और बेहतर तरीका है?
धन्यवाद!
अद्यतन: द्वारा googling और पर खोज अतः मैंने पाया कि मैं पैकेज freetype2 की कमी हो सकती है, फिर भी, अगर मैं मैं एक चेतावनी संदेश मिल homebrew से यह स्थापित करने का प्रयास:
[me @ my mac]$ brew search freetype
Apple distributes freetype with OS X, you can find it in /usr/X11/lib.
However not all build scripts look here, so you may need to call ENV.x11
in your formula's install function.
मेरे त्रुटि संदेश अलग थे लेकिन 'ब्रेव इंस्टॉल freetype'' तो 'पाइप इंस्टॉल matplotlib' ओएसएक्स 10.8 पर मेरे लिए चाल थी।2 – hobs
@ हॉब्स: मुझे सफल 'पाइप इंस्टॉल matplotlib' रखने के लिए' brew install libpng' का भी उपयोग करना था। इन पैकेजों को सूचीबद्ध करने के लिए धन्यवाद जेवियर। –