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

preguntada hace 3 años1564 visualizaciones
4 Respuestas
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.

respondido hace 3 años
0
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
respondido hace 3 años
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
respondido hace 3 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas