brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: uv python install fetches a python version without touching the system

Python
~/tips/tip-python-uv-install-version

uv python install 3.12

Downloads and manages extra python versions per user, independent of the distribution package.

I like that uv can download an interpreter for me, so a project is not tied to whatever the distribution ships.

uv python install 3.12
uv python list --only-installed
uv venv --python 3.12 .venv

uv python install downloads a standalone build of the requested version into uv’s own data directory, so apt and the system python stay untouched. uv python list --only-installed shows what uv manages, and uv venv --python 3.12 creates an environment on that version. It needs network access for the download, and these builds are separate from distribution packages, so you do not get security updates from apt for them.

Further reading: uv documentation: Python versions

More Python tips import asyncio from enum import StrEnum, auto except* ValueError as eg: import pytest pytest --maxfail=2 All Python tips (107) All topics

Link