首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >src/Xerces.cpp:13:10:致命错误: dom/DOMAttr.h:没有这样的文件或目录

src/Xerces.cpp:13:10:致命错误: dom/DOMAttr.h:没有这样的文件或目录
EN

Stack Overflow用户
提问于 2019-06-19 20:45:14
回答 1查看 98关注 0票数 1

我正在尝试安装PyExerces。但是我得到了gcc编译错误。这种事情在Ubuntu的python中正常吗?

(我在Python中几乎找不到XQuery库,它是XQilla,XQilla需要PyExerces,"pip install PyXerces“给出以下错误。还有一个用于python Xquery lib的Zorba。但这是一个过时的项目,其所需的软件包在Ubuntu 18中不再可用。python是怎么回事?:)找不到Python的XQuery库非常令人失望。)

代码语言:javascript
复制
erhan@erhan-VirtualBox:~$ sudo pip install PyXerces
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
WARNING: The directory '/home/erhan/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: The directory '/home/erhan/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting PyXerces
  Downloading https://files.pythonhosted.org/packages/bf/64/421bc05f5b679ba95cc9bde319ad824406fa5522bef3621ba9125edf16bf/PyXerces-0.0.1.tar.gz (122kB)
     |████████████████████████████████| 122kB 773kB/s 
Installing collected packages: PyXerces
  Running setup.py install for PyXerces ... error
    ERROR: Complete output from command /usr/bin/python2.7 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-FNousf/PyXerces/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-56rydK/install-record.txt --single-version-externally-managed --compile:
    ERROR: running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/Xerces
    copying Xerces/etree.py -> build/lib.linux-x86_64-2.7/Xerces
    copying Xerces/__init__.py -> build/lib.linux-x86_64-2.7/Xerces
    creating build/lib.linux-x86_64-2.7/Xerces/util
    copying Xerces/util/__init__.py -> build/lib.linux-x86_64-2.7/Xerces/util
    copying Xerces/util/XMLUniDefs.py -> build/lib.linux-x86_64-2.7/Xerces/util
    running build_ext
    building 'Xerces.__Xerces' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/src
    creating build/temp.linux-x86_64-2.7/src/util
    creating build/temp.linux-x86_64-2.7/src/common
    creating build/temp.linux-x86_64-2.7/src/internal
    creating build/temp.linux-x86_64-2.7/src/framework
    creating build/temp.linux-x86_64-2.7/src/framework/psvi
    creating build/temp.linux-x86_64-2.7/src/parsers
    creating build/temp.linux-x86_64-2.7/src/dom
    creating build/temp.linux-x86_64-2.7/src/sax
    creating build/temp.linux-x86_64-2.7/src/validators
    creating build/temp.linux-x86_64-2.7/src/validators/common
    creating build/temp.linux-x86_64-2.7/src/validators/DTD
    creating build/temp.linux-x86_64-2.7/src/validators/schema
    creating build/temp.linux-x86_64-2.7/src/validators/schema/identity
    creating build/temp.linux-x86_64-2.7/src/validators/datatype
    creating build/temp.linux-x86_64-2.7/src/sax2
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-MW0004/python2.7-2.7.15=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/include -I/usr/include/python2.7 -c src/Xerces.cpp -o build/temp.linux-x86_64-2.7/src/Xerces.o -std=c++0x
    src/Xerces.cpp:13:10: fatal error: dom/DOMAttr.h: No such file or directory
     #include "dom/DOMAttr.h"
              ^~~~~~~~~~~~~~~
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command "/usr/bin/python2.7 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-FNousf/PyXerces/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-56rydK/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-FNousf/PyXerces/
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-06-20 02:40:44

版本0.0.1发布于2014年。你确定这个包是可用的吗?不管怎样,…

这是包中的错误。distribution at PyPI包括Python源代码和C++文件,但不包括文件。标头在the repository中可用。尝试直接从Github安装:

代码语言:javascript
复制
pip install git+https://github.com/mugwort-rc/pyXerces.git#egg=pyXerces

您需要一些额外的依赖项。当编译开始需要Boost库时,我停止了编译。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56667991

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档