Env = python 2.7.10 (cygwin distribution), Windows 7, Cygwin 64
1) pip install psycopg2 failed as I didn't have pip
debug
2) Installed pip from here: pip.pypa.io/en/stable/installing/
3) pip install psycopg2 failed due to 'no pg_config...'
4) psycopg2 installer for win (www.stickpeople.com/projects/python/win-psycopg/) failed cause I am using cygwin's python install, not the python in the machine's registry and this installer won't allow user to install anywhere else other thatn the python that is registred with Windows
(Installer succeeded, but the files were not where I needd them.)
("Copying" the files didn't work.)
5) This (https://github.com/nwcell/psycopg2-windows) pip install "worked" (gave no errors) but when I tried to import, I got the message:
"ImportError: No module named psycopg2"
6) pip uninstall psycopg2
7) Tried to pip install libpq-dev and python-dev
"Could not find a version that satisfies the requirement libpq-dev (from versions: )
No matching distribution found for libpq-dev"
8) installed Postgres & pg_config from here http://www.enterprisedb.com/products-services-training/pgdownload#windows
9) added pg_config to path
10) pip install psycopg2 now worked
11) import psycopg2 in .py file caused core dump
Stack trace:
Frame Function Args
006001A5A60 0018007261A (000FFFFE3F4, 0000000E514, 00000000000, 000FFFFDE50)
006001A5B00 00180073DD0 (00077801FD6, 00000000000, 00000000140, 00000000000)
006001A5D50 0018012EF8F (00600010540, 00000000000, 003DB05FDB0, 6FFFFF28050)
006001A6040 0018012BC70 (0000000000D, 00000000000, 00000000000, 0018013D7DA)
00000000000 0018012C139 (006001A6030, 3630303030303030, 3036303030303030, 00000
00000B)
00000000000 0018012C30C (00000000000, 10000000A8E73, 6F007000650072, 61006C0074
0072)
00000000000 00180127BFB (00000000000, 10000000A8E73, 6F007000650072, 61006C0074
0072)
00000000000 00180071169 (01000000010, 00000000000, 00000000000, 000FFFFCE00)
000FFFFAA00 00180073D11 (B64000B00630079, 00000000088, 1D17578E1C375D4, 1D17578
E16661AE)
52004F00520052 64006F00630072 (00000000088, 1D17578E1C375D4, 1D17578E16661AE, 1
D175A09055FB4F)
52004F00520052 70002E00730065 (1D17578E1C375D4, 1D17578E16661AE, 1D175A09055FB4
F, 1D175A09055FB4F)
52004F00520052 B64000B00630079 (1D17578E16661AE, 1D175A09055FB4F, 1D175A09055FB
4F, 0000000180B)
52004F00520052 00000000088 (1D175A09055FB4F, 1D175A09055FB4F, 0000000180B, 0000
0002000)
52004F00520052 1D17578E1C375D4 (1D175A09055FB4F, 0000000180B, 00000002000, 01A0
0000020)
52004F00520052 1D17578E16661AE (0000000180B, 00000002000, 01A00000020, 45001600
000000)
52004F00520052 1D175A09055FB4F (00000002000, 01A00000020, 45001600000000, 4E004
500540058)
End of stack trace (more stack frames may be present)
(The above took ~2 days.)
12) pip install pg8000 worked
13) imported pg8000 to .py file and connected to DB
(Steps 12 and 13 took ~20 minutes.)