I’m experimenting with the uv package manager for Python. Sometimes I want to try out a package briefly, but I don’t want to commit it to my project’s dependencies until I know I’ll use it.
In npm, one can run:
npm install package-name --no-save
which installs locally without modifying package.json.
I checked:
uv add --help
and the documentation, but I couldn’t find an equivalent --no-save
option.
Is there an option or command in uv to install a package temporarily without adding it to pyproject.toml? If not, what’s the correct way to achieve this behavior?
uv pip install dependency_name
would do exactly that - install the package keeping your pyproject and lockfile intact.
This is a low-level interface that mimics pip behavior as closely as possible. docs