3
我试图运行一个Python脚本作为亚马逊EMR上的映射器。亚马逊EMR上的Python映射器
我的脚本的初始部分类似于:
import sys
import decimal
def some_function(sensor_record):
return 1
导致下面的错误输出:
[...]/mapper_script.py: line 1: import: command not found
[...]/mapper_script.py: line 2: import: command not found
[...]/mapper_script.py: line 5: syntax error near unexpected token `('
[...]/mapper_script.py: line 5: `def some_function(sensor_record):'
对这个有什么想法?我之前成功使用过EMR,但没有使用Python。 我通过web界面和使用 boto库获得了相同的结果。