title: How do I manage third-party Python libraries with Google App Engine? (virtualenv? pip?)
body: <p>What's the best strategy for managing third-party Python libraries with Google App Engine?</p>
  
  <p>Say I want to use Flask, a webapp framework. <a href="http://www.franciscosouza.com/2010/08/flying-with-flask-on-google-app-engine/" rel="nofollow noreferrer">A blog entry</a> says to do this, which doesn't seem right:</p>
  
  <pre><code>$ cd /tmp/
  $ wget http://pypi.python.org/packages/source/F/Flask/Flask-0.6.1.tar.gz
  $ tar zxf Flask-0.6.1.tar.gz
  $ cp -r Flask-0.6.1/flask ~/path/to/project/
  (... repeat for other packages ...)
  </code></pre>
  
  <p>There must be a better way to manage third-party code, especially if I want to track versions, test upgrades or if two libraries share a subdirectory. I know that Python can import modules from zipfiles and that <em>pip</em> can work with a wonderful REQUIREMENTS file, and I've seen that <em>pip</em> has a <code>zip</code> command for use with GAE.</p>
  
  <p>(Note: There's a handful of similar questions — <a href="https://stackoverflow.com/questions/3899706/including-a-third-party-python-package-in-django-on-app-engine">1</a>, <a href="https://stackoverflow.com/questions/4530183/python-eggs-on-google-app-engine">2</a>, <a href="https://stackoverflow.com/questions/4090268/google-app-engine-python-virtualenv-and-mimetypes">3</a>, <a href="https://stackoverflow.com/questions/2139693/unittest-import-error-with-virtualenv-google-app-engine-django">4</a>, <a href="https://stackoverflow.com/questions/2743806/best-deployment-strategy-for-python-google-app-engine">5</a> — but they're case-specific and don't really answer my question.)</p>