cd ~/.virtualenvs/myvirtualenv/lib/python2.x/site-packages
echo 'import sys;sys.setdefaultencoding("utf-8")' > sitecustomize.py
to automatically create a sitecustomize.py every time you create a virtualenv, edit your
#!/bin/bash
# This hook is run after a new virtualenv is activated.
PY_VERSION=`ls $VIRTUAL_ENV/lib/`
echo 'import sys;sys.setdefaultencoding("utf-8")' > $VIRTUAL_ENV/lib/$PY_VERSION/site-packages/sitecustomize.py
# -*- coding: utf-8 -*-