我试着在我的电脑上安装eric ide。我安装了PyQt4包,并且安装了Python2.7。但安装过程中出现了以下错误。我找了很久,但什么也没找到。有人能帮上忙吗?谢谢。
E:\Downloads\eric4-4.5.16> python install.py
Checking dependencies
Python Version: 2.7.3
Found PyQt4
Found QtHelp
Found QScintilla2
Qt Version: 4.8.5
PyQt Version: 4.10.3
QScintilla Version: 2.7.2
All dependencies ok.
Cleaning up old installation ...
Creating configuration file ...
Compiling user interface files ...
An internal error occured. Please report all the output of the program,
including the following traceback, to eric4-bugs@eric-ide.python-projects.org.
Traceback (most recent call last):
File "install.py", line 1093, in <module>
main(sys.argv)
File "install.py", line 1011, in main
compileUiFiles()
File "install.py", line 906, in compileUiFiles
compileUiDir(sourceDir, True, pyName)
File "C:\Python27\lib\site-packages\PyQt4\uic\__init__.py", line 134, in compi
leUiDir
compile_ui(root, ui)
File "C:\Python27\lib\site-packages\PyQt4\uic\__init__.py", line 126, in compi
le_ui
compileUi(ui_file, py_file, **compileUi_args)
File "C:\Python27\lib\site-packages\PyQt4\uic\__init__.py", line 175, in compi
leUi
winfo = compiler.UICompiler().compileUi(uifile, pyfile, from_imports, resour
ce_suffix)
File "C:\Python27\lib\site-packages\PyQt4\uic\Compiler\compiler.py", line 139,
in compileUi
w = self.parse(input_stream, resource_suffix)
File "C:\Python27\lib\site-packages\PyQt4\uic\uiparser.py", line 943, in parse
document = parse(filename)
File "C:\Python27\lib\xml\etree\ElementTree.py", line 1183, in parse
tree.parse(source, parser)
File "C:\Python27\lib\xml\etree\ElementTree.py", line 656, in parse
parser.feed(data)
File "C:\Python27\lib\xml\etree\ElementTree.py", line 1643, in feed
self._raiseerror(v)
File "C:\Python27\lib\xml\etree\ElementTree.py", line 1507, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: syntax error: line 1, column 0发布于 2013-12-01 22:09:01
可用于下载here的.tar.gz文件(eric4-4.5.16.tar.gz)中的tarfile包含“pax header”,这似乎是7-Zip不支持的。
这些标题以文件的形式出现在7-Zip中。您会得到一个错误,因为来自其中一些pax头的数据正在覆盖.ui文件,这些文件应该包含描述图形用户界面各部分是如何构建的XML文档。当然,pax头文件中的数据不是XML,因此当PyQt试图将这些文件解析为XML时,您会得到一个XML解析错误。
这个问题在here和here出现之前就已经出现了。后者甚至建议(至少对我而言),要生成不带pax头的.tar.gz文件,只需在生成归档文件时删除一个开关。
鉴于7-Zip似乎是在Windows上解压.tar.gz文件的首选工具,这种情况的发生是不方便的。考虑到7-Zip的流行,对于Eric开发人员来说,如果可能的话,从这个.tar.gz文件中删除pax头文件似乎是明智的,因为这样可以防止进一步的混乱。我不知道他们是否有使用这些头文件的原因。
同时,如果你使用的是Windows,我建议使用.zip文件(eric4-4.5.16.zip)。
https://stackoverflow.com/questions/20311915
复制相似问题