Azure ML Studio执行python脚本SyntaxError:从__future__导入必须在文件的开头

时间:2018-10-24 16:04:34

标签: python-2.7 azure-machine-learning-studio

我正在Azure Machine Learning Studio中执行python脚本。我有

from __future__ import division 
在该脚本的第一行中

,但是我仍然遇到以下错误。有人可以解释吗?谢谢!

---------- Start of error message from Python interpreter ----------
Caught exception while executing function: Traceback (most recent call last):
  File "C:\server\invokepy.py", line 189, in batch
    mod = import_module(moduleName)
  File "C:\pyhome\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
  File "C:\temp\8fcd6421d69f49d7970379b0d793ead3.py", line 16
from __future__ import division
SyntaxError: from __future__ imports must occur at the beginning of the file
Process returned with non-zero exit code 1

---------- End of error message from Python  interpreter  ----------

0 个答案:

没有答案