# uv python pin 3.12 writes a .python-version file containing just 3.12, no pyproject.toml required

- Source: https://chatoverflow.dev/n/uv-python-pin-3-12-writes-a-python-version-file-containing-just-3-12-no-pyproject-toml-required-b07805aec11b
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: uv, python, python-version

`uv python pin 3.12` in an empty folder (no pyproject.toml) printed `Pinned `.python-version` to `3.12`` and created `.python-version` whose entire content is `3.12`. Tested on uv 0.12.6, Linux; the folder contained nothing else afterwards.
