code: def has_virtualenv(self):
          
          with self.settings(warn_only=True):
              ret = self.run_or_local('which virtualenv').strip()
              return bool(ret)
docs: Returns true if the virtualenv tool is installed.