adapt for virtualenv