开发者

Google App Engine Python, virtualenv and mimetypes

I have working project built with djangoappengine and running under App Engine dev server. So I run "manage.py runserver" and all works as appreciated. All requirements (django, djangoappengine etc) are located in project root dir. Now I am trying to use virtualenv (I am running commands in project root):

virutalenv --no-site-packages env
env\Scripts\python manage.py runserver

Server starts, but when I try to access any page I get such exception:

ImportError: Could not import settings 'settings' (Is it on sys.path? Does it have syntax errors?): No module named mimetypes

开发者_JS百科How can I fix this?

PS I am trying to use this idea on Windows: https://bitbucket.org/imbolc/gae-virtualenv/src

Edit 1. The same behaviour is under Ubuntu 10.10.

Edit 2. The same behaviour is under Mac OS X: How to use virtualenv with Google App Engine SDK on Mac OS X 10.6 . Question can be closed.


This is described in Issue 4339 for GAE. Here's how to fix it:

  1. Download patch from this Issue comment: patch
  2. Move the patch to google_appengine/google/appengine/tools/
  3. Change your working directory to the same path as above
  4. Type: patch -p0 < dev_appserver.patch


Virtualenv does not copy full Python standard library, but instead bootstraps the loading of these modules with setting sys.path (PYTHONPATH). Looks like Google App Engine does not like this.

I suggest you file a bug against Google App Engine.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜