def _running_under_regular_virtualenv():
    """This handles virtual environments created with pypa's virtualenv."""
    # pypa/virtualenv case
    return hasattr(sys, "real_prefix")
This handles virtual environments created with pypa's virtualenv.
src/pdm/models/in_process/sysconfig_get_paths.py