【发布时间】:2018-06-30 05:31:09
【问题描述】:
当我运行 Glue 作业并尝试导入 pyRserve python 模块(纯 Python)时,我收到此错误:
LogType:stdout
Log Upload Time:Sun Jan 21 12:27:32 +0000 2018
LogLength:206
Log Contents:
Traceback (most recent call last):
File "script_2018-01-21-12-27-05.py", line 8, in <module>
import pyRserve
ImportError: No module named pyRserve
End of LogType:stdout
以下是关于我的工作的详细信息:
$ aws glue get-job --job-name test_trunc
{
"Job": {
"Name": "test_trunc",
"Role": "arn:aws:iam::#CLIPPED#:role/AWSGlueServiceRoleDefault",
"CreatedOn": 1516192543.117,
"LastModifiedOn": 1516537317.889,
"ExecutionProperty": {
"MaxConcurrentRuns": 1
},
"Command": {
"Name": "glueetl",
"ScriptLocation": "s3://#CLIPPED#/gluescripts/test_trunc"
},
"DefaultArguments": {
"--TempDir": "s3://#CLIPPED#/jobs/test_trunc/scripts",
"--extra-py-files": "s3://#CLIPPED#/jobs/test_trunc/python-libs/pyRserve.zip",
"--job-bookmark-option": "job-bookmark-disable",
"--job-language": "python"
},
"Connections": {
"Connections": [
"redshift"
]
},
"MaxRetries": 0,
"AllocatedCapacity": 10
}
}
这是我正在运行的脚本:
import sys
from awsglue.transforms import *
from awsglue.utils import getResolvedOptions
from pyspark.context import SparkContext
from awsglue.context import GlueContext
from awsglue.job import Job
import pprint
import pyRserve
这是完整的日志:
https://gist.github.com/mattazend/b611d0232d94ade4bc4c16bcb79f73a8
【问题讨论】:
标签: python amazon-web-services apache-spark aws-glue