这是我的错误:
(mysite)zjm1126@zjm1126-G41MT-S2:~/zjm_test/mysite$ pip install lxml
Downloading/unpacking lxml
Running setup.py egg_info for package lxml
Building lxml version 2.3.
Building without Cython.
ERROR: /bin/sh: xslt-config: not found
** make sure the development packages of libxml2 and libxslt are installed **
Using build configuration of libxslt
Installing collected packages: lxml
Running setup.py install for lxml
Building lxml version 2.3.
Building without Cython.
ERROR: /bin/sh: xslt-config: not found
** make sure the development packages of libxml2 and libxslt are installed **
Using build configuration …Run Code Online (Sandbox Code Playgroud) 我正在尝试在Windows 64位机器上为Python 2.7构建lxml.我找不到Python 2.7版本的lxml egg.所以我从源头编译它.我正在按照本网站上的说明操作
在静态链接部分下.我收到了错误
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 …Run Code Online (Sandbox Code Playgroud) 我发现Linux发行版的现有Python文档非常出色.对于Windows ......不是那么多.我已经配置好我的Linux系统,但我需要一些帮助才能准备好Windows 8.1平板电脑.
我的项目需要Python 3.4的lxml模块.我发现了很多关于如何安装lxml的教程,但每个教程都失败了.
https://docs.python.org/3/installing/ 我已经下载了"get-pip.py"并成功地从Windows cmd行运行了它,结果如下:
Requirement already up-to-date: pip in c:\python34\lib\site-packages
Run Code Online (Sandbox Code Playgroud)
所以我认为我没有"点"问题.从那里我从Windows cmd行运行以下命令:
python -m pip install lxml
Run Code Online (Sandbox Code Playgroud)
一长串命令滚动,但有几行似乎是我无法解决的错误.
ERROR: b"'xslt-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"
** make sure the development packages of libxml2 and libxslt are installed **
Run Code Online (Sandbox Code Playgroud)
和
Failed building wheel for lxml
Run Code Online (Sandbox Code Playgroud)
最后一部分都是红色的
Command "C:\Python34\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\\Owner\\AppData\\Local\\Temp\\pip-build-ya3n6wkd\\lxml\\setup.py';exec(compi
le(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\Owner\AppData\Local\Temp\pip-ytybzl9l-r
ecord\install-record.txt --single-version-externally-managed --compile" failed with error code …Run Code Online (Sandbox Code Playgroud) 我已经搜索了但没有用于py2.7的libxml2二进制文件.
我也试过运行setup.py for py2.6.9但它给了我错误
failed to find headers for libxml2: update includes_dir
Run Code Online (Sandbox Code Playgroud)
有没有人有办法解决吗?