I\'m trying to work with psycopg2 natively on Mac. It installs fine, with no errors at least, but when i import it get an error message.
I\'ve seen dozens of threads wit
Thanks guys.
@maxymoo I went with your suggestion. I have installed anaconda2. The install updated my path to include /anaconda/bin.
Then using the navigator I installed pyscopg2. Now I am able to use this in the shebang and my scripts execute fine and i'm able to import this module.
Gurmokhs-MBP:rest Gurmokh$ python
Python 2.7.12 |Anaconda 4.2.0 (x86_64)| (default, Jul 2 2016, 17:43:17)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import psycopg2
if psycopg2.connect("dbname='postgres' user='postgres' host='localhost'"):
... print "connection made"
...
connection made
>>>