No module named 'psycopg2'

0

Despite this being one of only two pre-installed Python modules (https://docs.aws.amazon.com/mwaa/latest/userguide/working-dags-dependencies.html), I'm getting this error (No module named 'psycopg2') with a test DAG. It's from the following import:
from airflow.operators.postgres_operator import PostgresOperator

This service isn't listed in the Support Ticket drop-down yet, so I'm hoping somebody here might have an idea!

BTW, I don't think these submodules should have an impact on the availability of psycopg2, but here's my requirements.txt file.

(All in the form "apache-airflow bracket submodule bracket", reformatted for this post)
amazon
postgres
mysql
docker
slack
crypto

Thanks for your time,
Tim

Edited by: TKnight-HG on Dec 1, 2020 11:21 AM

Edited by: TKnight-HG on Dec 1, 2020 11:23 AM

質問済み 3年前1566ビュー
4回答
0

My requirements.txt file contained an error on the "postgres" Extra package (a space was inside the bracket). Fixing that line and properly updating the environment to point to the new version of the file solved the problem.

回答済み 3年前
0

We have followed the troubleshooting guide and are still receiving the same error. Are there any other resources we can reference in order to resolve this issue?

k-af
回答済み 3年前
0

Hi!

If any of your requirements fail, then the rest will quit loading. There will be better logging in the near future, however in the interim please try removing apache-airflow bracket crypto bracket from the list as it looks like that is the one that is failing.

Thanks!

Edited by: JohnJ-AWS on Jan 6, 2021 1:33 PM

AWS
John_J
回答済み 3年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ