2012-02-14 11 views
1

私は自分のコンピュータにlxmlをインストールしようとしていますが、問題があります。誰も助けることができますか?私は 'easy_install lxml'を実行しようとしているときに、私が得ている端末出力を提供しました。私はMac OS X 10.5とPython 2.7.2を使っています。おかげで!:easy_install lxml os 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はどちらも同じパッケージリポジトリを使用していると思いますが、それは価値があります。

+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パッケージを試してみてください。 'port search lxml'を使って利用可能なバージョンを確認します。 – larsbutler

関連する問題