def is_pip_compatible_with_python(python_version: Version | str) -> bool:
    """Check the given python version is compatible with the pip installed"""
    from pdm.compat import importlib_metadata
    from pdm.models.specifiers import get_specifier

    pip = importlib_metadata.distribution("pip")
    requires_python = get_specifier(pip.metadata.get("Requires-Python"))
    return requires_python.contains(python_version, True)
Check the given python version is compatible with the pip installed
src/pdm/utils.py