python插件安装错误解决办法之SyntaxError: from __future__ imports must occur at the beginning of the file原因
生活随笔
收集整理的這篇文章主要介紹了
python插件安装错误解决办法之SyntaxError: from __future__ imports must occur at the beginning of the file原因
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
今天在用到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
移到文件開始第一行的位置即可安裝成功。
總結
以上是生活随笔為你收集整理的python插件安装错误解决办法之SyntaxError: from __future__ imports must occur at the beginning of the file原因的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 如何在 python 环境下 开发 We
- 下一篇: python错误解决方案之关于报urll