title: psycopg in wrong python - Ubuntu
body: <p>I'm running Ubuntu. I installed python2.7 and the latest version of Postgresql. </p>
  
  <p>When I installed psycopg, the package showed up in the default Ubuntu version of python instead of the 2.7 version that I want to use.</p>
  
  <p>I tried to reinstall from within the directory I wanted, but it still referenced the other python. When I open the python shell, the version in 2.7. </p>
  
  <p>How can I install psycopg into 2.7? </p>
  
  <p>Thanks for your help.</p>
  
  <p>Joe</p>
  
  <pre><code>Stack after installation:
  Traceback (most recent call last):
    File "/usr/lib/python2.7/site.py", line 562, in &lt;module&gt;
      main()
    File "/usr/lib/python2.7/site.py", line 544, in main
      known_paths = addusersitepackages(known_paths)
    File "/usr/lib/python2.7/site.py", line 271, in addusersitepackages
      user_site = getusersitepackages()
    File "/usr/lib/python2.7/site.py", line 246, in getusersitepackages
      user_base = getuserbase() # this will also set USER_BASE
    File "/usr/lib/python2.7/site.py", line 236, in getuserbase
      USER_BASE = get_config_var('userbase')
    File "/usr/lib/python2.7/sysconfig.py", line 543, in get_config_var
      return get_config_vars().get(name)
    File "/usr/lib/python2.7/sysconfig.py", line 442, in get_config_vars
      _init_posix(_CONFIG_VARS)
    File "/usr/lib/python2.7/sysconfig.py", line 303, in _init_posix
      makefile = _get_makefile_filename()
    File "/usr/lib/python2.7/sysconfig.py", line 297, in _get_makefile_filename
      return os.path.join(get_path('platstdlib').replace("/usr/local","/usr",1), "config" + (sys.pydebug and "_d" or ""), "Makefile")
  AttributeError: 'module' object has no attribute 'pydebug'
  </code></pre>