私は、ElementTree が私がやりたいことを実行しないという事実を理解するようになりました。lxml のドキュメントを確認しましたが、私の目的には合っているようです。lxml を取得するには、easy_install を取得する必要があります。ということで、こちらからダウンロードして、入れてみました/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/
。次に、そのフォルダーに移動して実行しましsh setuptools-0.6c11-py2.6.egg
た。
それは正常にインストールされました。easy_install の全体的なポイントは、easy_install lxml を介してインストールするだけで、lxml が魔法のようにダウンロード、ビルド、および適切にインストールされ、インポートを楽しむ準備ができるということだと思ったので、興奮しました。だから私は走っeasy_install lxml
た。以下に結果を貼り付けました。私は何をすべきか?
easy_install lxml
Searching for lxml
Reading http://pypi.python.org/simple/lxml/
Reading http://codespeak.net/lxml
Best match: lxml 2.2.6
Downloading http://codespeak.net/lxml/lxml-2.2.6.tgz
Processing lxml-2.2.6.tgz
Running lxml-2.2.6/setup.py -q bdist_egg --dist-dir /var/folders/49/49N0+g5QFKCm51AbzMtghE+++TI/-Tmp-/easy_install-rxbP6K/lxml-2.2.6/egg-dist-tmp-fjakR0
Building lxml version 2.2.6.
NOTE: Trying to build without Cython, pre-generated 'src/lxml/lxml.etree.c' needs to be available.
Using build configuration of libxslt 1.1.12
Building against libxml2/libxslt in the following directory: /usr/lib
unable to execute gcc-4.0: No such file or directory
error: Setup script exited with error: command 'gcc-4.0' failed with exit status 1