title: postgres and python
body: <p>In postgres 9.2 I am trying to create a python program that can be a trigger.   I want to run an external program (an exe on the local disk) so I am using python to run it.  When I try to create a simple program like this:</p>
  
  <pre><code>CREATE FUNCTION one ()
  RETURNS int
  AS $$
  # PL/Python function body
  $$ LANGUAGE plpythonu;
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>ERROR:  language "plpythonu" does not exist
  HINT:  Use CREATE LANGUAGE to load the language into the database.
  </code></pre>
  
  <p>When I run: </p>
  
  <pre><code>CREATE LANGUAGE plpythonu
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>ERROR:  could not access file "$libdir/plpython2": No such file or directory
  </code></pre>
  
  <p>I am using Windows 7 and python 2.5 .</p>
  
  <p>I have looked in many places but cannot find a solution.</p>
  
  <p>Any ideas?</p>