32

Pythonバインディングをセットアップして最終的にlxmlを使用できるように、libxml2をインストールしようとしています。

しかし、私はファイルを解凍することになっている地球上でうまくいくことができません。うまくグーグルできませんでした。

インストールを成功させるには、Cygwin/MinGW が必要ですか?

現時点では、libxml2.tar.gz と libxslt.tar.gz のファイルが Python フォルダー内のそれぞれのディレクトリにあります。そのため、include の下の tar にあったファイルは、Python26\include\libxml2\libxml... などにあります。

ただし、easy_install lxml を実行すると、次の出力が表示されます。

Searching for lxml
Reading http://pypi.python.org/simple/lxml/
Reading http://codespeak.net/lxml
Best match: lxml 2.2.4
Downloading http://codespeak.net/lxml/lxml-2.2.4.tgz
Processing lxml-2.2.4.tgz
Running lxml-2.2.4\setup.py -q bdist_egg --dist-dir c:\users\rocco\appdata\local
\temp\easy_install-1xwbhy\lxml-2.2.4\egg-dist-tmp-9zwhe4
Building lxml version 2.2.4.
NOTE: Trying to build without Cython, pre-generated 'src/lxml/lxml.etree.c' need
s to be available.
ERROR: 'xslt-config' is not recognized as an internal or external command,
operable program or batch file.

** make sure the development packages of libxml2 and libxslt are installed **

Using build configuration of libxslt
warning: no files found matching 'lxml.etree.c' under directory 'src\lxml'
warning: no files found matching 'lxml.objectify.c' under directory 'src\lxml'
warning: no files found matching 'lxml.etree.h' under directory 'src\lxml'
warning: no files found matching 'lxml.etree_api.h' under directory 'src\lxml'
warning: no files found matching 'etree_defs.h' under directory 'src\lxml'
warning: no files found matching 'pubkey.asc' under directory 'doc'
warning: no files found matching 'tagpython*.png' under directory 'doc'
error: Setup script exited with error: Unable to find vcvarsall.bat

私はこれを1週間以上進めようとしてきたので、どんな助けも非常に役に立ちます:(

ありがとう

4

5 に答える 5

33

lxml の最新バージョンの Windows バイナリ (およびその他のさまざまな Python パッケージ) は、http: //www.lfd.uci.edu/~gohlke/pythonlibs/ で入手できます。

于 2012-01-29T20:04:47.640 に答える
28

ソースからコンパイルする特別な理由がない場合は、lxml のビルド済みバイナリを使用できます。

于 2009-12-15T01:57:42.077 に答える
3

これは古いトピックですが、これを Windows にインストールする際に問題が発生したことを認識してください。

Python バージョン 3.4.4 を使用しています。

whl ファイルをインストールしようとするときは、Python のバージョンに適したバージョンを使用していることを確認してください。

この場合、私は使用する必要がありました

lxml‑3.4.4‑cp34‑none‑win_amd64.whl

最新のものではありませんでした

lxml‑3.4.4‑cp35‑none‑win_amd64.whl

cp34 は、ビルド対象の Python バージョンを示します。

新しいプレイヤーのためのトラップ...!

于 2015-10-19T11:37:38.153 に答える
3

Python 2.5.x を使用している場合は、「easy_install lxml==2.2.2」を使用してインストールします

于 2010-10-28T09:08:23.360 に答える
0

プログラム「xslt-config」が PATH 環境のディレクトリに配置されていないようです。Windows での PATH の設定に関する記事は次のとおりです。

http://www.cs.usask.ca/~wew036/latex/env.html

于 2009-12-15T01:59:39.997 に答える