首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >PyXML Ubuntu 13.1,错误:安装脚本退出,返回错误:命令'x86_64-linux-gnu-gcc‘失败,退出状态为%1

PyXML Ubuntu 13.1,错误:安装脚本退出,返回错误:命令'x86_64-linux-gnu-gcc‘失败,退出状态为%1
EN

Stack Overflow用户
提问于 2013-11-11 22:42:02
回答 1查看 2.1K关注 0票数 0

很难在UBuntu 13.1.0上安装PyXML,因为它抛出错误:错误:安装脚本退出,错误:命令'x86_64-linux-gnu-gcc‘失败,退出状态为1

我用谷歌搜索了一下,但只能找到安装python-dev的说明,但我已经这样做了(就像下面的代码中演示的那样)。我还将HAVE_MEMMOVE 1添加到了pyconfig.h

有没有人有主意?

谢谢,

代码语言:javascript
复制
 ravin@Eowyn:~$ sudo easy_install PyXML
Searching for PyXML
Reading http://pypi.python.org/simple/PyXML/
Best match: PyXML 0.8.4
Downloading http://downloads.sourceforge.net/pyxml/PyXML-0.8.4.tar.gz?modtime=1101741917&big_mirror=0
Processing PyXML-0.8.4.tar.gz
Writing /tmp/easy_install-DrBxsQ/PyXML-0.8.4/setup.cfg
Running PyXML-0.8.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-DrBxsQ/PyXML-0.8.4/egg-dist-tmp-ae0fv1
warning: no files found matching '*.html' under directory 'extensions/expat'
warning: no files found matching '*Makefile' under directory 'extensions/expat'
warning: no files found matching '*.dsp' under directory 'extensions/expat'
warning: no previously-included files matching '*/CVS/*' found anywhere in distribution
extensions/expat/lib/xmlparse.c:75:2: error: #error memmove does not exist on this platform, nor is a substitute available
 #error memmove does not exist on this platform, nor is a substitute available
  ^
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
ravin@Eowyn:~$ sudo apt-get install python-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

EN

回答 1

Stack Overflow用户

发布于 2013-11-11 22:54:37

为什么要安装PyXML?它是为旧版本的python编写的。尝试使用ElementTree,它使用起来很简单,甚至还支持XPath

您可以从以下内容开始

代码语言:javascript
复制
from xml.etree.ElementTree import ElementTree

然后继续使用parsingmanipulating

编辑:

here中的已知问题

在Ubuntu13.04上安装PyXML和cElementTree将会失败,这就是为什么现在这些都是可选的。如果你试图在Ubuntu 13.04上安装adspygoogle,你应该避免安装这些依赖项。如果您需要使用这两个依赖项中的任何一个,目前可以在此bug中找到解决方法。

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

https://stackoverflow.com/questions/19909013

复制
相关文章

相似问题

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