2013-02-06 5 views
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을 찾는 실패 할 것 같은, 그것의 많은 이해 할 수없는 것

* 파일을하지만 난 그들을 위해 검색 할 때 . , 그들은 분명히 존재합니다. 내가 뭘 놓치고 있니?

감사합니다.

+0

'Python.h'가 누락 된 것 같습니다. python3-dev 패키지가 설치되어 있습니까? – tacaswell

+0

그게 문제를 정렬, 나는 python3 - dev를 놓쳤습니다! 누락 된 패키지라는 표시는 무엇입니까? 당신이 완전한 대답으로 응답하면 나는 받아 들일 것이고 운명을 비운다! – Tomassino

답변

1

Python.h가 누락 된 것 같습니다. python3-dev 패키지가 설치되어 있습니까?

표시되지 않는 파일은 Python.h입니다.

In file included from ./CXX/Extensions.hxx:37:0,<-- (2) an include file in (1) 
       from src/ft2font.h:6, <-- (1) an include file in (0) 
       from src/ft2font.cpp:3: <-- (0) file gcc was trying to compile 
./CXX/WrapPython.h:58:20: fatal error: Python.h: No such file or directory 
^(3) an include in (2) with error ^the actually missing file 

Python.h은 python의 개발자 헤더입니다. 누락 된 헤더가 속한 패키지가 무엇인지 모르는 경우에는 배포판의 패키지를 검사 할 수 있으며 대부분의 패키지는 '파일 이름으로 검색'기능을 갖추고 있습니다. Ex the ubuntu package listing.