DEV Community


Posted on


legacy-install-failure Encountered error while trying to install package:psycopg2-binary


Install When you're using Ubuntu 22.04/ubuntu 22.10

sudo apt-get install libpq5=14.5-0ubuntu0.22.04.1 && sudo apt-get install libpq-dev
Enter fullscreen mode Exit fullscreen mode

Django old version doesn't work well with psycopg2-binary latest or version > 8
You can resolve this issue by installing

pip install psycopg2-binary==2.8.6
Enter fullscreen mode Exit fullscreen mode

Hope it will save you some time

Top comments (0)

Here is a post you might want to check out:

Regex for lazy developers

regex for lazy devs

Sorry for the callout 😆