4

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 

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.

1

2 Answers 2

4

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
Sign up to request clarification or add additional context in comments.

1 Comment

That direct link to the patch has a token which seems to expire. The patch is attached to this comment on the issue: code.google.com/p/googleappengine/issues/detail?id=4339#c2
1

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.