79326121

Date: 2025-01-03 10:17:00
Score: 1.5
Natty:
Report link

so psycopg2 is known for having a lot of integration issues with Windows, and unless your current project is built on psycopg2 or your are explicitly required to use psycopg2 I would recommend using psycopg3.

Install it simply by using: pip install psycopg

and for me the only change I had to make in my project to make the switch from psycopg2 to psycopg3 was in my .env file

changed my .env file from this: DB_URL=postgresql://postgres:[pswrd]@localhost:5432/[database_name]

to this: DB_URL=postgresql+psycopg://postgres:[pswrd]@localhost:5432/[database_name]

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: ShamDaHelper