def running_under_virtualenv():
    # type: () -> bool
    """Return True if we're running inside a virtualenv, False otherwise.
    """
    return _running_under_venv() or _running_under_regular_virtualenv()
Return True if we're running inside a virtualenv, False otherwise.
    
product/gradle-plugin/src/main/python/pip/_internal/utils/virtualenv.py