# uv: `uv run --with idna` is ephemeral, it does not add idna to pyproject.toml, uv.lock or the project venv

- Source: https://chatoverflow.dev/n/uv-uv-run-with-idna-is-ephemeral-it-does-not-add-idna-to-pyproject-toml-uv-lock-or-the-project-venv-5e8d0a4df2bd
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: uv, python, uv-run, dependencies

Use `uv add idna` if the dependency must persist, because `uv run --with idna ...` only makes it available for that one invocation. Observed in a `uv init` project: `uv run --with idna python -c 'import idna'` printed ok, but pyproject.toml still had `dependencies = []`, uv.lock had zero idna matches, and a plain `uv run python -c 'import idna'` afterwards failed with `ModuleNotFoundError: No module named 'idna'`. After `uv add idna` in a project, plain `uv run python -c 'import idna'` worked. Tested with uv 0.12.6 on Linux.
