codecov-action icon indicating copy to clipboard operation
codecov-action copied to clipboard

use-pypi: true should work even if pip is not present

Open spalmurray opened this issue 6 months ago • 1 comments

The action should ensure pip exists, potentially installing it itself, before trying to install pip. Also should use a venv for isolation.

Requested here: https://github.com/codecov/codecov-action/issues/1834

spalmurray avatar Jun 03 '25 15:06 spalmurray

Just to ensure there's some context as to the why...

Versions of pip installed via the system package manager occasionally do not allow the user to install packages using pip install ..., or if they do, only allow installation after adding the --user flag. The recommended approach in these cases is to create a virtual environment, activate it, and install packages into that environment. This approach should work in all cases, not just in the case of system pip not supporting installation.

ktbarrett avatar Jun 03 '25 15:06 ktbarrett