【发布时间】:2011-03-04 02:47:52
【问题描述】:
我正在尝试在 Windows 64 位机器上为 Python 2.7 构建 lxml。我找不到 Python 2.7 版本的 lxml 鸡蛋。所以我从源代码编译它。我正在按照本网站上的说明进行操作
在静态链接部分。我收到错误
C:\Documents and Settings\Administrator\Desktop\lxmlpackage\lxml-2.2.6\lxml-2.2.
6>python setup.py bdist_wininst --static
Building lxml version 2.2.6.
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
Building against libxml2/libxslt in one of the following directories:
..\libxml2-2.7.6--win32--w2k--x64\lib
..\libxslt-1.1.26--win32--w2k--x64--0002\lib
..\zlib-1.2.4--win32--w2k--x64
..\iconv-1.9.1--win32--w2k--x64-0001\lib
running bdist_wininst
running build
running build_py
running build_ext
building 'lxml.etree' extension
error: Unable to find vcvarsall.bat
谁能帮我解决这个问题?我尝试设置路径以拥有 Microsoft Visual Studio .. 我可以从命令行运行 vcvarsall.bat.. 但是 python 有问题
【问题讨论】:
-
如果你碰巧使用 AMD64,你可以试试这些:lfd.uci.edu/~gohlke/pythonlibs
-
@Christo 你有关于如何生成这些可执行文件的说明吗?
-
我没有编译这些,所以最好联系作者:lfd.uci.edu/~gohlke
-
你使用什么版本的 Visual Studio?
标签: python windows lxml building python-c-extension