web-dev-qa-db-ja.com

libxml2をインストールし、関連するpythonバインディング-Windows

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

しかし、私は地球上でここで解決することができません。ファイルを解凍することになっています。 Googleを正常に検索できませんでした。

インストールを成功させるために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週間以上続けようとしているので、どんな助けでも非常に役立ちます:(

ありがとう

31
Rocco

ソースからコンパイルする特別な理由がない場合は、lxmlに prebuilt binaries を使用できます。

28
YOU

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

33
chuckus

python 2.5.xを使用している場合は、 "easy_install lxml == 2.2.2"を使用してインストールするだけです

3
wind Hsu

これは古いトピックですが、これを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ビルド対象のバージョンを示します。

新しいプレイヤーのためのrap ...!

3
Mark

プログラム「xslt-config」がPATH環境のディレクトリにないようです。 WindowsでのPATHの設定に関する記事を次に示します。

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

0
AJ.