Skip to content

Conversation

@Olapels
Copy link
Contributor

@Olapels Olapels commented Jan 25, 2026

While running the code :
uv run pgcli -h localhost -p 5432 -u root -d ny_taxi

from this section:
https://github.com/DataTalksClub/data-engineering-zoomcamp/blob/main/01-docker-terraform/docker-sql/05-data-ingestion.md

I ran into this error :

ImportError "no pq wrapper available" when importing psycopg3
however when I run :
uv add "psycopg[binary,pool]"

That fixes the issue and is the recommended way to install psycopg according to the official docs to resolve any dependency issues.

https://pypi.org/project/psycopg/

A slight modification is required for the ingest_data.py script to expressly tell SQLAlchemy to use the psycopg3 version installed and not fall back to psycopg2

will submit another pr for the ingest_data script separately.

why psycopg3? It works well and better with >= Python3.13, which the Docker image relies on.

While running the code :
uv run pgcli -h localhost -p 5432 -u root -d ny_taxi

from this section:
https://github.com/DataTalksClub/data-engineering-zoomcamp/blob/main/01-docker-terraform/docker-sql/05-data-ingestion.md

I ran into this error :

ImportError "no pq wrapper available" when importing psycopg3

however when i run :
uv add "psycopg[binary,pool]" 

That fixes the issue and is the recommended way to install psycopg according to the official docs. 

https://pypi.org/project/psycopg/

A slight modification is required for the ingest_data.py script to expressly tell SQLAlchemy to use the psycopg3 version installed and not fall back to psycopg3.

will submit another pr for the ingest_data script separately.

why psycopg3? It works well and better with >= Python3.13, which the Docker image relies on.
Olapels added a commit to Olapels/data-engineering-zoomcamp that referenced this pull request Jan 25, 2026
This fix tells SQLAlchemy to expressly use the installed psycopg version and not fall back to psycopg2 as a default.

original pr link here :

DataTalksClub#782
alexeygrigorev pushed a commit that referenced this pull request Jan 27, 2026
This fix tells SQLAlchemy to expressly use the installed psycopg version and not fall back to psycopg2 as a default.

original pr link here :

#782
@alexeygrigorev alexeygrigorev merged commit c9e8112 into DataTalksClub:main Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants