1
嘗試構建Python3的matplotlib時遇到以下錯誤。我已經安裝了Numpy和Scipy(包括調試擴展)。我也安裝了libpng12-0和libfreetype6(和調試),但仍然沒有。Matplotlib ft2font生成錯誤(python3)
運行python3 setup.py build
後,我得到如下:
running build_ext
building 'matplotlib.ft2font' extension
gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -DPYCXX_PYTHON_2TO3=1 -I/usr/local/include -I/usr/include -I/usr/lib/python3/dist-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/usr/include/python3.2mu -c src/ft2font.cpp -o build/temp.linux-i686-3.2/src/ft2font.o
In file included from ./CXX/Extensions.hxx:37:0,
from src/ft2font.h:6,
from src/ft2font.cpp:3:
./CXX/WrapPython.h:58:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
[email protected]:~/Downloads/matplotlib$ sudo find/-name "ft2font*"
/home/tom/Downloads/matplotlib/src/ft2font.cpp
/home/tom/Downloads/matplotlib/src/ft2font.h
[email protected]:~/Downloads/matplotlib$
我似乎無法利用它多大意義,因爲它似乎無法找到在src/ft2font *文件,但是當我尋找他們。 ,他們肯定存在。我錯過了什麼?
謝謝!
它看起來像你缺少'Python.h'。你有沒有安裝python3-dev軟件包? – tacaswell
排序問題,我錯過了python3-dev!什麼是這是缺少的包裹的指標?如果你作爲一個完整的答案作出迴應,我將接受並讓業力下雨! – Tomassino