python-3.x - 使用 Python 3 运行 Apache Beam v 2.2.5 时,我应该使用哪个版本的 dill?
问题描述
我正在尝试使用 Apache Beam v 2.25 和 Python 3.7 运行数据流作业。使用 DirectRunner 时一切正常,但当它尝试从另一个私有 Python 模块调用函数时,作业出错。
错误是
AttributeError: Can't get attribute '_create_code' on <module 'dill._dill' from '/usr/local/lib/python3.7/site-packages/dill/_dill.py'>
我的设置文件如下所示:
setup(
name="Rich Profile and Activiation reports",
version="0.1",
description="Scripts for reports",
author="Kim Merino",
install_requires=REQUIRED_PACKAGES,
packages=setuptools.find_packages(),
include_package_data=True,
package_data={"": ["*.json"]},
)
我的问题是我应该为 Apache Beam v. 2.25 使用哪个版本的 dill?我目前正在使用 Dill v 0.3.3
我有一个外部依赖项,需要莳萝才能工作
解决方案
你试过--save_main_session=True
在运行管道时设置吗?
https://cloud.google.com/dataflow/docs/resources/faq#how_do_i_handle_nameerrors
推荐阅读
- angular - 将 json 数据转换为 component.ts 中的对象
- python - XOR 神经网络不学习
- sas - 将函数评估为值声明宏变量
- c# - C#如何在不同的datagridview中选择两个同名的项目?
- sql - 模式匹配 Postgres
- asp.net-mvc-4 - ImageRezising.net Faces 插件上的空错误
- reactjs - React - Antd - 在表格中显示/隐藏列
- ms-access - 在 ms-access VBA 中获取“运行时错误 - 13:类型不匹配”消息
- python - 使用 NLTK、Python 在 StanfordDependencyParser 中设置几个 corenlp_options
- python - 在 Pandas 中使用存储在 DataFrame 单元格中的列表的值