I am pulling my hair out trying to figure this out because I had it working until last week and somehow it broke.
When I setup a virtualenv for a Google App Engine app
It's an issue 4339 with the GAE SDK, it's confirmed and there are two slightly different patches available in the bug entry that make it work.
What happens is dev_appserver.py
sets up a restricted python environment by disallowing access to any non-system-python modules and it does that by calculating the system python folder from the location of the os
module. In a virtualenv instance the os.py
gets symlinked into the virtualenv but gets compiled straight into virtualenv, and this is the path that dev_appserver uses, effectively blocking access to any module from the system python library that is not linked by virtualend, which is most of them. The solution is to "bless" both paths.