按照SOAPpy安装文档说明,事先安装了fpconst-0.7.2和PyXML-0.8.4,但执行"python setup.py install"时报了以下错误:
Traceback (most recent call last):
File "setup.py", line 10, in <module>
from SOAPpy.version import __version__
File "R:/SOAPpy-0.11.3/SOAPpy/SOAPpy/__init__.py", line 5, in <module>
from Client import *
File "R:/SOAPpy-0.11.3/SOAPpy/SOAPpy/Client.py", line 50
from __future__ import nested_scopes
SyntaxError: from __future__ imports must occur at the beginning of the file
随后网上查找问题,发现在模块下Client.py、Server.py和Types.py(补充:GSIServer.py)四个文件中将"from __future__ import nested_scopes"置于首行即可成功安装。
本文记录了一次SOAPpy安装过程中的错误及解决方案。错误出现在执行安装命令时,具体为from __future__ imports must occur at the beginning of the file。通过调整Client.py等文件中的__future__导入位置解决了该问题。
2859

被折叠的 条评论
为什么被折叠?



