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

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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠