title: Psycopg2: 'module' object has no attribute 'connect'
body: <p>I'm trying to connect to a postgres database with psycopg2:</p>
  
  <pre><code>import psycopg2
  
  try:
      conn = psycopg2.connect("dbname='puppetdb' user='puppetdb' host='172.17.0.1' port='5432' password='puppetdb'")
  except Exception, e:
      print "I am unable to connect to the database"
      print e
  </code></pre>
  
  <p>Which returns:</p>
  
  <pre><code>I am unable to connect to the database
  'module' object has no attribute 'connect'
  </code></pre>
  
  <p>I've made sure that psycopg2 is installed with <code>pip install psycopg2</code> and it seems like this should work according to the <a href="http://initd.org/psycopg/docs/module.html" rel="noreferrer">documentation</a>.</p>
  
  <p>Am I doing this wrong?</p>