Error while trying to import psycopg with poetry #7

Closed
opened 2026-02-16 05:16:02 -05:00 by yindo · 2 comments
Owner

Originally created by @FilippoFlorindiKAI on GitHub (Apr 26, 2024).

This is the error message I got:

- couldn't import psycopg 'c' implementation: No module named 'psycopg_c'
- couldn't import psycopg 'binary' implementation: No module named 'psycopg_binary'
- couldn't import psycopg 'python' implementation: libpq library not found

My dependencies are these:

[tool.poetry.dependencies]
python = "^3.12"
fastapi = "^0.110.1"
uvicorn = "^0.29.0"
loguru = "^0.7.2"
sqlalchemy = "^2.0.29"
boto3 = "^1.34.84"
asyncpg = "^0.29.0"
greenlet = "^3.0.3"psycopg2-binary = "^2.9.9"
pydantic = {version = "^2.7.0", extras = ["email"]}
python-dotenv = "^1.0.1"
jwcrypto = "^1.5.6"
jinja2 = "^3.1.3"
mangum = "^0.17.0"
requests = "^2.31.0"
deepgram-sdk = "^3.2.6"
langchain = "^0.1.16"
langchain-openai = "^0.1.3"
langgraph = "^0.0.32"
langchain-google-genai = "^1.0.2"
langchain-mistralai = "^0.1.2"
langchain-anthropic = "^0.1.11"
google-auth-oauthlib = "^1.2.0"
fuzzywuzzy = "^0.18.0"
levenshtein = "^0.25.1"
msgraph-sdk = "^1.3.0"
guardrails-ai = "^0.4.3"
twilio = "^9.0.5"
alembic = "^1.13.1"
psycopg2-binary = "^2.9.9"
langchain-postgres = "^0.0.3"
Originally created by @FilippoFlorindiKAI on GitHub (Apr 26, 2024). This is the error message I got: ``` - couldn't import psycopg 'c' implementation: No module named 'psycopg_c' - couldn't import psycopg 'binary' implementation: No module named 'psycopg_binary' - couldn't import psycopg 'python' implementation: libpq library not found ``` My dependencies are these: ``` [tool.poetry.dependencies] python = "^3.12" fastapi = "^0.110.1" uvicorn = "^0.29.0" loguru = "^0.7.2" sqlalchemy = "^2.0.29" boto3 = "^1.34.84" asyncpg = "^0.29.0" greenlet = "^3.0.3"psycopg2-binary = "^2.9.9" pydantic = {version = "^2.7.0", extras = ["email"]} python-dotenv = "^1.0.1" jwcrypto = "^1.5.6" jinja2 = "^3.1.3" mangum = "^0.17.0" requests = "^2.31.0" deepgram-sdk = "^3.2.6" langchain = "^0.1.16" langchain-openai = "^0.1.3" langgraph = "^0.0.32" langchain-google-genai = "^1.0.2" langchain-mistralai = "^0.1.2" langchain-anthropic = "^0.1.11" google-auth-oauthlib = "^1.2.0" fuzzywuzzy = "^0.18.0" levenshtein = "^0.25.1" msgraph-sdk = "^1.3.0" guardrails-ai = "^0.4.3" twilio = "^9.0.5" alembic = "^1.13.1" psycopg2-binary = "^2.9.9" langchain-postgres = "^0.0.3" ```
yindo closed this issue 2026-02-16 05:16:02 -05:00
Author
Owner

@eyurtsev commented on GitHub (Apr 29, 2024):

You need to install the build dependencies for postgres. This is usually done using brew or apt.

@eyurtsev commented on GitHub (Apr 29, 2024): You need to install the build dependencies for postgres. This is usually done using brew or apt.
Author
Owner

@manoj9896 commented on GitHub (May 7, 2024):

You need to install psycopg_binary

@manoj9896 commented on GitHub (May 7, 2024): You need to install psycopg_binary
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langchain-postgres#7