Added function to work with virtualenv