setup-uv icon indicating copy to clipboard operation
setup-uv copied to clipboard

Set `--system` by default when not using a virtual environment

Open techman83 opened this issue 1 year ago • 0 comments

Given the description of this option, and this being a CI tool, getting workflow errors is an unexpected out of the box experience.

WARNING: UV_SYSTEM_PYTHON=true is intended for use in continuous integration (CI) or containerized environments and should be used with caution, as modifying the system Python can lead to unexpected behavior.

Example error

error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment`

I think it's probably quite sensible to export UV_SYSTEM_PYTHON=true if not passing the uv-venv input, and it would more closely match the experience of pip when using actions/setup-python.

techman83 avatar Dec 01 '24 05:12 techman83