【发布时间】:2019-08-09 19:04:44
【问题描述】:
我正在为 python 使用 cygwin。我无法安装 lxml,因为它显示了一些库丢失错误。
creating tmp
cc -I/usr/include/libxml2 -c /tmp/xmlXPathInit94yfjj.c -o
tmp/xmlXPathInit94yfjj.o
/tmp/xmlXPathInit94yfjj.c:1:10: fatal error: **libxml/xpath.h: No such file
or directory**
#include "libxml/xpath.h"
^~~~~~~~~~~~~~~~
compilation terminated.
Could not find function xmlCheckVersion in library libxml2. Is libxml2
installed?
***error: command 'gcc' failed with exit status 1***
Failed building wheel for lxml
Running setup.py clean for lxml
Failed to build lxml
Installing collected packages: lxml
Running setup.py install for lxml ... error
Complete output from command
/cygdrive/c/Users/1419104/Torutils/env/bin/python -u -c "import setuptools,
tokenize;__file__='/tmp/pip-install-
3aL8Ib/lxml/setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code,
__file__, 'exec'))" install --record /tmp/pip-record-driSho/install-
record.txt --single-version-externally-managed --compile --install-headers
/cygdrive/c/Users/1419104/Torutils/env/include/site/python2.7/lxml:
Building lxml version 4.3.2.
有人可以帮忙吗?
【问题讨论】:
-
对我来说仍然没有解决方案。我也无法安装任何库 libxslt 和 libxml2。在执行“easy_install lxml”时出现类似“ERROR: /bin/sh: xslt-config: command not found”的错误
-
试试:
apt-cyg install libxml2-devel
标签: python-2.7 gcc pip cygwin lxml