python - 升级 AWS Apache Airflow (MWAA) 中的 python 版本

标签 python amazon-web-services airflow mwaa

我正在 AWS (MWAA) 中使用 Apache Airflow,并且部署了一个在 python 3.8 上开发的 python 包。它在本地运行良好,但是,在 MWAA 上它开始出现语法错误,可能是因为 MWAA 中的 python 版本是 3.7。是否有可能升级 MWAA 中的 python 版本或任何解决方法?

最佳答案

正如您在这里看到的 https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-faqs.html#python-version MWAA使用python 3.7

这意味着插件DAG必须使用python 3.7(没有海象适合你!) 但是 tasks 仍然可以在 python 3.8+ 上运行,如果:

  • 您在 docker 中运行它们(通过 EC2、Sagemaker 或其他)
  • 您使用 bashOperator 在工作线程上升级 python(我不推荐)

我希望他们尽快升级。

关于python - 升级 AWS Apache Airflow (MWAA) 中的 python 版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72898433/

相关文章:

python - CentOS 5.2 上的 Python 2.6 中缺少 HTTPSConnection 模块

python - 将传递的 arg 转换为字符串

amazon-web-services - 无法连接 AWS EC2 端口 6379 上的 Redis 服务器

airflow - 如果没有任何任务失败,Airflow DAG 怎么会失败?

python - 为什么这段获取 Airflow 上下文的代码会在 DAG 导入时运行?

python - 为什么我需要在路径转换器中使用 to_url() 方法? Django

python - 如何在 Python 中将对象数组保存到文件中

javascript - typescript 不捆绑模块

python-3.x - Lambda 支持的自定义资源