I have python 2.7 installed locally in ~/Python2.7/ and I need the psycopg2 module. But when I try to install it with easy_install or compile it manually, I get
error: invalid Python installation: unable to open /usr/local/lib/python2.7/config/Makefile (No such file or directory)
I tried to change a line in ~/Python2.7/Lib/sysconfig.py from
return os.path.join(get_path('stdlib'), "config", "Makefile")
to
return '/home/foo/Python2.7/Makefile'
with no effect. What do I do to walk around this?