title: Installing PyGtk in virtualenv
body: <p>So I am trying to run a simple matplotlib example in my virtualenv (in the console). Here's the code:</p>
  
  <pre><code>import matplotlib
  matplotlib.use('GTKAgg')
  import matplotlib.pyplot as plt
  radius = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0]
  area = [3.14159, 12.56636, 28.27431, 50.26544, 78.53975, 113.09724]
  plt.plot(radius, area)
  plt.show()
  </code></pre>
  
  <p>However, when I run this I get:</p>
  
  <blockquote>
    <p>ImportError: Gtk* backend requires pygtk to be installed.</p>
  </blockquote>
  
  <p>And now the fun starts. I tried to pip install pygtk but it throws:</p>
  
  <pre><code>********************************************************************
  * Building PyGTK using distutils is only supported on windows. *
  * To build PyGTK in a supported way, read the INSTALL file.    *
  ********************************************************************
  Complete output from command python setup.py egg_info:
  ********************************************************************
  </code></pre>
  
  <p>I have checked the <code>INSTALL</code> file and says to try <code>./configfure; make; make install</code>. However. I am not quite sure how to do this within virtualenv. Where do I unpack the sources for pygtk in order to be installed within virtualenv.</p>