【发布时间】:2021-01-26 16:21:50
【问题描述】:
使用 setup.py 在我的 DataFlow 工作人员上安装依赖项时出现以下错误:
CalledProcessError Traceback (most recent call last)
~/apache-beam-2.27.0/lib/python3.7/site-packages/apache_beam/utils/processes.py in check_output(*args, **kwargs)
90 try:
---> 91 out = subprocess.check_output(*args, **kwargs)
92 except OSError:
/opt/conda/lib/python3.7/subprocess.py in check_output(timeout, *popenargs, **kwargs)
410 return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
--> 411 **kwargs).stdout
412
/opt/conda/lib/python3.7/subprocess.py in run(input, capture_output, timeout, check, *popenargs, **kwargs)
511 raise CalledProcessError(retcode, process.args,
--> 512 output=stdout, stderr=stderr)
513 return CompletedProcess(process.args, retcode, stdout, stderr)
CalledProcessError: Command '['/root/apache-beam-2.27.0/bin/python', 'setup.py', 'sdist', '--dist-dir', '/tmp/tmpcljk596r']' returned non-zero exit status 1.
我的 Setup.py 文件正是 Apache Beam 提出的,我想安装 2 个 python 模块和一个 apt-get :
CUSTOM_COMMANDS = [
['apt-get', 'update'],
['apt-get', '--assume-yes', 'install', 'poppler-utils']
]
REQUIRED_PACKAGES = ['pdf2image', 'poppler-utils']
这是一个非常痛苦的错误,因为在我看来,我使用 setup.py 选项的方式与在我的工作人员上使用 apt-get 安装依赖项的方式完全相同。
像往常一样,使用 DirectRunner 就像一个魅力 :)
我的配置:
- Python 3.7.9 上的 Apache Beam 2.27.0
- GCP 上的 DataFlow 笔记本
- (在笔记本外运行 DataFlow 时遇到同样的错误)
感谢您的帮助
最好的问候
杰罗姆
【问题讨论】:
-
你能解决吗?
标签: google-cloud-dataflow apache-beam