pypa / pipenv

Python Development Workflow for Humans.
https://pipenv.pypa.io
MIT License
24.87k stars 1.87k forks source link

pipenv's vendored pip is not guaranteed to support the version of Python in the virtualenv #5685

Open tucked opened 1 year ago

tucked commented 1 year ago

I installed pipenv-2023-4-29 with Python 3.9 (via pipx), and I am trying to pipenv install --deploy a Pipfile with

[requires]
python_version = "3.6"

It's able to create the virtualenv using my pyenv-installed 3.6.15, but it fails to deploy because

This version of pip does not support python 3.6 (requires >=3.7).

https://github.com/pypa/pipenv/blob/88f030e00bb9767e9488511b2bbdb62d4b641999/pipenv/patched/pip/__pip-runner__.py#L21

Shouldn't pipenv be using the-venv/bin/python -m pip (which is guaranteed to support the associated Python)? Alternatively, if the project is taking a hard line against supporting 3.6, an error should be raised as soon as the incompatible python_version is encountered.

matteius commented 1 year ago

We dropped support for python 3.6 a year ago and the last release to support it was 2022.4.8. We vendor in the latest pip, and it too dropped support for python 3.6. I agree we should raise the error sooner in the process.