0
点赞
收藏
分享

微信扫一扫

python插件安装错误解决办法之SyntaxError: from __future__ imports must occur at the beginning of the file原因

成义随笔 2022-03-30 阅读 102


今天在用到SOAPpy做webservice的过程当中,要进行安装SOAPpy。SOAPpy0.11版本安装没有问题,但在安装其以上版本时发现SyntaxError: from __future__ imports must occur at the beginning of the file这样一个错误,安装不上去。后来无意中搜到一篇文章,讲到这是其本身的一个bug。需进行以下修改即可安装成功:

在其安装包中打开SOAPpy文件夹下找到如下三个文件:

Client.py

Types.py

Server.py

然后分别把它们当中的这行语句:from __future__ import nested_scopes

移到文件开始第一行的位置即可安装成功。



举报

相关推荐

0 条评论