0

I'm trying to add psycopg02 package to a Django project which using virtualenv.

I'm new in Python/Django development and also new to Apple Mac OS X.

Please find a screenshot of the error here

Emad Mokhtar
  • 3,237
  • 5
  • 31
  • 49
  • Pycharm did it via pip like the attached screenshot shows... – barrios Dec 02 '14 at 08:53
  • Do you have PostgreSQL installed on your machine? – sb9 Dec 02 '14 at 09:08
  • Also take a look at [this](http://stackoverflow.com/questions/20170895/mac-virtualenv-pip-postgresql-error-pg-config-executable-not-found) question – sb9 Dec 02 '14 at 09:09
  • If you want to install psycopg2 package in virtualenv you have to have pythonX-dev package installed. where X is either 2 or 3, depending on which python you are using. Thats what i have to do under Ubuntu anyway. No idea if this is helpful to you. – Odif Yltsaeb Dec 02 '14 at 10:36
  • Is this because I'm linking my global python with my virutalenv? if yes so how to do it right? – Emad Mokhtar Dec 02 '14 at 12:50

1 Answers1

1

I fix this by installing EnterpriseDB PostgreSQL and create the virtualenv through Terminal instead of PyCharm

Emad Mokhtar
  • 3,237
  • 5
  • 31
  • 49