问题描述
AWS 胶水未导入 s3fs 模块
import s3fs
我希望导入该库,但 AWS 胶水说
导入错误:没有名为 s3fs 的模块
AWS Glue 作业附带了一些预先安装的常用库,但除此之外,您需要下载该库的 .whl
来自 pypi,在 s3fs
的情况下,可以在
这将提示 Glue 在运行脚本之前安装此存储桶中的库.请注意,目前仅支持纯 Python 库.
AWS glue is not importing s3fs module
import s3fs
I expect the library to be imported but AWS glue says
ImportError:No module named s3fs
AWS Glue jobs come with some common libraries pre installed but for anything more than that you need to download the .whl
for the library from pypi, which in the case of s3fs
can be found here.
Once you have that, upload it to an s3 bucket, eg. s3://my-libraries/
and reference it in the Python library path
field in the console.
This will prompt Glue to install the libraries within this bucket prior to running the script. Note that only pure python libraries are support currently.
这篇关于AWS Glue 中 s3fs 库的导入失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!