The error: bad marshal data
When you try to install a python package you get the error:
Traceback (most recent call last):
from sqlalchemy.ext.declarative import declarative_base
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/declarative/__init__.py", line 8, in
Check the traceback path and delete all the pycs files recursively:
find /PATH_ON_TRACEBACK -name '*.pyc' -delete
In our case the path was "/usr", howevery it could be inside your virtualenv.