Fix exception error in virtualenv