簡體   English   中英

PyXML Ubuntu 13.1,錯誤:安裝腳本退出,錯誤:命令“ x86_64-linux-gnu-gcc”失敗,退出狀態為1

[英]PyXML Ubuntu 13.1, error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

努力在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.

在此處輸入圖片說明

為什么要嘗試安裝PyXML? 它是為python的舊版本編寫的。 嘗試使用ElementTree,它簡單易用,甚至支持XPath

您可以從開始

from xml.etree.ElementTree import ElementTree

然后繼續解析操作

編輯:

此處的已知問題

在Ubuntu 13.04上PyXML和cElementTree的安裝將失敗,這就是為什么現在這些都是可選的。 如果您嘗試在Ubuntu 13.04上安裝adspygoogle,則應避免安裝這些依賴項。 如果您需要使用這些依賴關系中的任何一個,當前可以在此Bug中找到解決方法。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM