首页 > 解决方案 > Glue 与 Pandas 一起使用,基于文档

问题描述

根据文档,我正在尝试让 Pandas 工作?

在他们提到的 Python Shell 作业支持的库列表下:

pandas(需要通过 python setuptools 配置 setup.py 安装)

我已经用安装文件试过了

from setuptools import setup
setup(
    name="dependecy_package",
    version="0.1",
    packages=['pandas','shapely','psycopg2','s3fs'],
    package_dir = {'': '/home/user/.local/lib/python3.6/site-packages'}
) 

我上传了这个生成的 egg 文件并上传到 S3。然后,我将新的 ex 文件作为运行作业设置的一部分进行引用。但是,我在启动时收到此错误

ImportError: C extension: No module named 'pandas._libs' not built. 
If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace --force' to build the C extensions first.

我该如何解决?

标签: pandasamazon-web-servicesaws-glue

解决方案


推荐阅读