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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则