Skip to content

Instantly share code, notes, and snippets.

@lym
Created April 17, 2015 14:04
Show Gist options
  • Save lym/456ec863d3fc3c63cab4 to your computer and use it in GitHub Desktop.
Save lym/456ec863d3fc3c63cab4 to your computer and use it in GitHub Desktop.
psycopg: Error: b'You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.\n'
# Just install libpq-dev
$ sudo apt-get install libpq-dev
@eduardo-g-silva
Copy link

genius thanks!!!

@huyvohcmc
Copy link

work like a charm :D

@chrismipi
Copy link

thanks, its works like a charm 💯

@denis19973
Copy link

Coll! Thanks!

@hoangmy92
Copy link

You saved my day 👍

@hhstore
Copy link

hhstore commented Dec 20, 2016

if you can not install libpq-dev, you should upgrade ubuntu first.

  • install libpq-dev:
# ubuntu 14.04,  fix for psycopg2:

# require do:
sudo apt-get upgrade -y

# do:
sudo apt install libpq-dev python-dev -y

# do:
sudo apt-get install postgresql postgresql-contrib -y

  • then, install psycopg2 must be ok.
pip install psycopg2

@maestrow
Copy link

maestrow commented Jun 6, 2020

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment