0
Requirement already satisfied: psycopg2 in/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages

This is the error message I get when I run

pip install psycopg2

in my terminal on Mac. But when I try to import it in python (simply using import psycopg2) in either version 2.7 or 3.6 of python I get an error message:

No module named 'psycopg2'

Any suggestions?

  • What does `python -c "import site; site.getsitepackages()"` print? What does `which python` print? – teppic Dec 29 '16 at 04:46
  • /Library/Frameworks/Python.framework/Versions/2.7/bin/python –  Dec 29 '16 at 06:12
  • Looks OK. It's possible that the permissions on the install are preventing you from accessing the module. That and some other possibilities are mentioned in answers to [this question](http://stackoverflow.com/questions/25276329/cant-load-python-modules-installed-via-pip-from-site-packages-directory) – teppic Dec 29 '16 at 06:24

0 Answers0