python - PyXML Ubuntu 13.1,错误 : Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

标签 python ubuntu python-2.7 pyxml

努力在 UBuntu 13.1.0 上安装 PyXML,因为它抛出了错误:
错误:安装脚本退出并出现错误:命令“x86_64-linux-gnu-gcc”失败,退出状态为 1

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

有什么想法吗?

谢谢,

 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.

enter image description here

最佳答案

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

你可以从

from xml.etree.ElementTree import ElementTree

然后继续 parsingmanipulating

编辑:

来自 here 的已知问题

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

关于python - PyXML Ubuntu 13.1,错误 : Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19909013/

相关文章:

python-pptx 在布局中更改图片

python - pyenv virtualenv : The SDK seems invalid 的 pycharm 错误

linux - 如何使用 apt 按依赖项数量查找/列出包?

python - 计算 SGDClassifier 数据损失函数值的方法?

python - 如何最好地处理列表或数据框中的日期时间?

opencv - 如何在 ubuntu 11.10 中安装 opencv?

python-2.7 - 如果相同的文件名已存在,则移动并替换?

python-2.7 - 只读文件系统 : '/dev/null' while running google-cloud-sdk project

macos - python : Check if a directory is an alias

python - Pandas:使用自定义函数重新索引