【问题标题】:Libraries cannot be found on Dataflow/Apache-beam job launched from CircleCI在从 CircleCI 启动的 Dataflow/Apache-beam 作业中找不到库
【发布时间】:2020-10-14 07:57:40
【问题描述】:

我在使用从 CircleCI 启动的 GCP Dataflow 运行器运行 python Apache Beam 管道时遇到严重问题。如果有人能就如何解决这个问题提供任何提示,我将不胜感激,我已经尝试了所有方法,但似乎没有任何效果。

基本上,我正在运行这个 python Apache Beam 管道,它在 Dataflow 中运行并使用 google-api-python-client-1.12.3。如果我在我的机器 (python3 main.py --runner dataflow --setup_file /path/to/my/file/setup.py) 上运行该作业,它工作正常。如果我在 CircleCI 中运行相同的作业,则会创建 Dataflow 作业,但它会失败并显示消息 ImportError: No module named 'apiclient'

通过查看this documentation,我想我应该明确地使用requirements.txt 文件。如果我从 CircleCI 运行相同的管道,但将 --requirements_file 参数添加到包含单行 (google-api-python-client==1.12.3) 的需求文件中,则数据流作业会失败,因为工作人员也失败了。在日志中,首先有一条信息消息ERROR: Could not find a version that satisfies the requirement wheel (from versions: none)",这会导致后面的错误消息"Error syncing pod somePodIdHere (\"dataflow-myjob-harness-rl84_default(somePodIdHere)\"), skipping: failed to \"StartContainer\" for \"python\" with CrashLoopBackOff: \"back-off 40s restarting failed container=python pod=dataflow-myjob-harness-rl84_default(somePodIdHere)\"。我找到了this thread,但该解决方案似乎不适用于我的情况。

任何帮助都会非常非常感激。提前非常感谢!

【问题讨论】:

    标签: python google-cloud-dataflow apache-beam circleci google-api-python-client


    【解决方案1】:

    这个问题看起来和你的很相似。解决方案似乎是在您的 requirements.txt 中明确包含您的需求的依赖项

    apache beam 2.19.0 not running on cloud dataflow anymore due to Could not find a version that satisfies the requirement setuptools>=40.8

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-01-03
      • 2021-01-19
      • 1970-01-01
      • 1970-01-01
      • 2023-03-25
      • 1970-01-01
      • 2018-01-03
      • 2022-06-18
      相关资源
      最近更新 更多