title: Using psycopg2 in Ironpython (visual studio/PTVS)
body: <p>I am a newbie in Python and I am trying to use Ironpython with PTVS to access a Postgres database. 
  I had previously installed Python(x,y) and psycopg2 which I managed to use properly. However, realizing how painful it is (imo) to create GUIs with TKinter I decided to move to Ironpython and PTVS cause WPF GUIs are much easier (and I don't need to port the scripts to other systems).</p>
  
  <p>After installing PTVS and ironpython, I therefore created a project in Visual Studio and added to the "search paths" section the path to the psycopg2 package (within the install of Python(x,y)'s interpreter). I then tried a simple hello world with an import of psycopg2 but I am getting an error during the import.</p>
  
  <p>My code:</p>
  
  <pre><code>import psycopg2
  print "hello world"
  </code></pre>
  
  <p>The error I am getting:</p>
  
  <pre><code>    An Exception of type 'IronPython.Runtime.Exceptions.ImportException' occured in Snippets.debug.scripting but was not handled in user code
  Additional information: cannot import _psycopg from psycopg2
  </code></pre>
  
  <p>I have read somewhere that I am meant to create a virtual environment with psycopg2 in it, but I am not understanding how to do this.</p>
  
  <p>If someone could help me to figure this one out, that would be awesome.</p>
  
  <p>Thanks heaps</p>