2012-02-14 4 views
1

내 컴퓨터에 lxml을 설치하려고하는데 어려움이 있습니다. 누구든지 도와 줄 수 있습니까? 'easy_install lxml'을 실행하려고 할 때 터미널 출력을 제공했습니다. 저는 Mac OS X 10.5 및 Python 2.7.2 버전을 사용하고 있습니다. 감사합니다! :easy_install ox x 10.5의 어려움

Macintosh-8:~ momdad$ easy_install lxml 
Searching for lxml 
Reading http://pypi.python.org/simple/lxml/ 
Reading http://codespeak.net/lxml 
Best match: lxml 2.3.3 
Downloading http://lxml.de/files/lxml-2.3.3.tgz 
Processing lxml-2.3.3.tgz 
Running lxml-2.3.3/setup.py -q bdist_egg --dist-dir /var/folders/NA/NA4jZIQeGBihRLry0Fm6v++++TI/-Tmp-/easy_install-CAOPgi/lxml-2.3.3/egg-dist-tmp-SOj-c0 
Building lxml version 2.3.3. 
Building without Cython. 
Using build configuration of libxslt 1.1.12 
Building against libxml2/libxslt in the following directory: /usr/lib 
src/lxml/lxml.etree.c:276:31: error: libxml/schematron.h: No such file or directory 
src/lxml/lxml.etree.c:276:31: error: libxml/schematron.h: No such file or directory 
src/lxml/lxml.etree.c:2007: error: syntax error before ‘xmlSchemaSAXPlugStruct’ 
src/lxml/lxml.etree.c:2009: error: syntax error before ‘}’ token 
src/lxml/lxml.etree.c:2007: error: syntax error before ‘xmlSchemaSAXPlugStruct’ 
src/lxml/lxml.etree.c:2009: error: syntax error before ‘}’ token 
src/lxml/lxml.etree.c: In function ‘__pyx_pf_4lxml_5etree_14_ParserContext_1__dealloc__’: 
src/lxml/lxml.etree.c:73868: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree_14_ParserContext__copy’: 
src/lxml/lxml.etree.c:73962: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree_14_ParserContext_prepare’: 
src/lxml/lxml.etree.c:74266: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree_14_ParserContext_cleanup’: 
src/lxml/lxml.etree.c:74324: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree__handleParseResult’: 
src/lxml/lxml.etree.c:75040: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:75481: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:75494: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_pf_4lxml_5etree_14_ParserContext_1__dealloc__’: 
src/lxml/lxml.etree.c:73868: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree_14_ParserContext__copy’: 
src/lxml/lxml.etree.c:73962: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree_14_ParserContext_prepare’: 
src/lxml/lxml.etree.c:74266: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree_14_ParserContext_cleanup’: 
src/lxml/lxml.etree.c:74324: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree__handleParseResult’: 
src/lxml/lxml.etree.c:75040: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:75481: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:75494: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree_9iterparse__read_more_events’: 
src/lxml/lxml.etree.c:99050: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree_9iterparse__read_more_events’: 
src/lxml/lxml.etree.c:99050: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree_9XMLSchema__newSaxValidator’: 
src/lxml/lxml.etree.c:133262: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133262: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133262: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133263: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133298: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_pf_4lxml_5etree_30_ParserSchemaValidationContext___cinit__’: 
src/lxml/lxml.etree.c:133349: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133358: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133367: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_pf_4lxml_5etree_30_ParserSchemaValidationContext_1__dealloc__’: 
src/lxml/lxml.etree.c:133395: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133404: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133414: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_copy’: 
src/lxml/lxml.etree.c:133448: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133471: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133471: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133471: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_inject_default_attributes’: 
src/lxml/lxml.etree.c:133508: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133531: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_connect’: 
src/lxml/lxml.etree.c:133578: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133588: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133588: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133597: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133624: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133633: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133648: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133648: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_disconnect’: 
src/lxml/lxml.etree.c:133681: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133691: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133700: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_isvalid’: 
src/lxml/lxml.etree.c:133729: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133749: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree_9XMLSchema__newSaxValidator’: 
src/lxml/lxml.etree.c:133262: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133262: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133262: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133263: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133298: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_pf_4lxml_5etree_30_ParserSchemaValidationContext___cinit__’: 
src/lxml/lxml.etree.c:133349: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133358: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133367: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_pf_4lxml_5etree_30_ParserSchemaValidationContext_1__dealloc__’: 
src/lxml/lxml.etree.c:133395: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133404: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133414: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_copy’: 
src/lxml/lxml.etree.c:133448: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133471: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133471: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133471: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_inject_default_attributes’: 
src/lxml/lxml.etree.c:133508: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133531: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_connect’: 
src/lxml/lxml.etree.c:133578: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133588: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133588: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133597: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133624: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133633: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133648: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133648: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_disconnect’: 
src/lxml/lxml.etree.c:133681: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133691: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133700: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_isvalid’: 
src/lxml/lxml.etree.c:133729: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:133749: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_tp_new_4lxml_5etree__ParserSchemaValidationContext’: 
src/lxml/lxml.etree.c:149004: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:149005: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_tp_dealloc_4lxml_5etree__ParserSchemaValidationContext’: 
src/lxml/lxml.etree.c:149023: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:149023: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:149023: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:149023: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_tp_traverse_4lxml_5etree__ParserSchemaValidationContext’: 
src/lxml/lxml.etree.c:149030: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:149031: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_tp_clear_4lxml_5etree__ParserSchemaValidationContext’: 
src/lxml/lxml.etree.c:149039: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:149040: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: At top level: 
src/lxml/lxml.etree.c:149150: error: invalid application of ‘sizeof’ to incomplete type ‘struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext’ 
src/lxml/lxml.etree.c: In function ‘__pyx_tp_new_4lxml_5etree__ParserSchemaValidationContext’: 
src/lxml/lxml.etree.c:149004: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:149005: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_tp_dealloc_4lxml_5etree__ParserSchemaValidationContext’: 
src/lxml/lxml.etree.c:149023: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:149023: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:149023: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:149023: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_tp_traverse_4lxml_5etree__ParserSchemaValidationContext’: 
src/lxml/lxml.etree.c:149030: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:149031: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: In function ‘__pyx_tp_clear_4lxml_5etree__ParserSchemaValidationContext’: 
src/lxml/lxml.etree.c:149039: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c:149040: error: dereferencing pointer to incomplete type 
src/lxml/lxml.etree.c: At top level: 
src/lxml/lxml.etree.c:149150: error: invalid application of ‘sizeof’ to incomplete type ‘struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext’ 
lipo: can't open input file: /var/folders/NA/NA4jZIQeGBihRLry0Fm6v++++TI/-Tmp-//ccpgwsWT.out (No such file or directory) 
error: Setup script exited with error: command 'gcc' failed with exit status 1 
+0

짐작할 수 있겠지만 오류에서 libxslt을 찾을 수없는 것처럼 보입니다. 비표준 위치 ('/ usr/lib'에서 찾을 수 있습니다)에 설치했을 수도 있습니다.이 경우 설치 프로그램에게 어디에서 볼 것인지 명령 줄 옵션이있을 수 있습니다. 그렇지 않으면'/ usr/lib'에 libxslt를 설치해야 할 수도 있습니다. –

답변

0

난 그냥 오류보고 당신에게 근본 원인을 이야기하지만, 당신이 먼저 시도 할 수있는 쉬운 몇 가지가 없습니다 :

  • 실행 수퍼 유저로 설치를 (sudo easy_install lxml) (아직 작성하지 않은 경우).
  • pip를 사용해 설치하십시오. 필자는 OSX 10.6과 10.7에서 lxml을 설치하기 위해 pip를 사용하여 행운을 얻었습니다. 이미 삐삐가 없다면 sudo easy_install pip으로하십시오. 그런 다음 sudo pip install lxml을 수행하십시오.

그래도 작동하지 않는 경우 알려주십시오.

편집 : easy_install과 pip는 모두 같은 패키지 repos를 사용하지만 믿을만한 가치가 있습니다.

+0

여전히 빌드 오류가 발생합니다. 특히이 행은 문제의 원인을 나타낼 수 있습니까? – user1118042

+0

gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DMACOSX -I/usr/include/ffi -DENABLE_DTRACE -arch i386 -arch ppc -pipe -I/usr/include/libxml2 -I/시스템/라이브러리/프레임 워크/Python.framework/버전/2.5/include/python2.5 -c src/lxml/lxml.etree.c -o 빌드/temp.macosx-10.5-i386-2.5/src/lxml/lxml.etree.o -w -flat_namespace src/lxml/lxml.etree.c : 276 : 31 : 오류 : libxml /schematron.h : 그런 파일이나 디렉토리가 없습니다. – user1118042

+0

흠, 아마도 libxml2의 낡은/불일치 버전이있을 것입니다. 수작업으로 고치지 않으려면 lxml 용 macports 패키지를 사용해보십시오. '포트 검색 lxml'을 사용하여 사용 가능한 버전을 확인하십시오. – larsbutler