virtual-environments.md
This file
Path
docs/virtual-environments.md
35 lines · 1.1 KiB · Markdown
Last changed by
📝 Recommend uv projects by default in docs (#1903)Sebastián Ramírezbefore adoptione60a33e
History of this fileTake it
The walk stopped after 200 commits: lines older than 3780a29 point at it.
📝 Update link syntax to minimal Markdown (#1623)Sebastián Ramírezbefore adoption3780a29
lines 1–2why, one step back1# Virtual Environments2📝 Recommend uv projects by default in docs (#1903)Sebastián Ramírezbefore adoptione60a33e
line 3why, one step back3When you work with Python projects, you should use a **virtual environment** to isolate the packages installed for each project.📝 Update link syntax to minimal Markdown (#1623)Sebastián Ramírezbefore adoption3780a29
line 4why, one step back4📝 Recommend uv projects by default in docs (#1903)Sebastián Ramírezbefore adoptione60a33e
line 5why, one step back5For Typer projects, I recommend using [uv](https://docs.astral.sh/uv/) to manage the project, its dependencies, and its virtual environment.📝 Update link syntax to minimal Markdown (#1623)Sebastián Ramírezbefore adoption3780a29
line 6why, one step back6📝 Recommend uv projects by default in docs (#1903)Sebastián Ramírezbefore adoptione60a33e
line 7why, one step back7## Create a Project { #create-a-project }📝 Update link syntax to minimal Markdown (#1623)Sebastián Ramírezbefore adoption3780a29
line 8why, one step back8📝 Recommend uv projects by default in docs (#1903)Sebastián Ramírezbefore adoptione60a33e
line 9why, one step back9Install `uv` using the [official installation guide](https://docs.astral.sh/uv/getting-started/installation/), and then create a project:📝 Update link syntax to minimal Markdown (#1623)Sebastián Ramírezbefore adoption3780a29
lines 10–13why, one step back1011<div class="termy">1213```console📝 Recommend uv projects by default in docs (#1903)Sebastián Ramírezbefore adoptione60a33e
line 14why, one step back14$ uv init awesome-project --bare📝 Update link syntax to minimal Markdown (#1623)Sebastián Ramírezbefore adoption3780a29
line 15why, one step back15$ cd awesome-project📝 Recommend uv projects by default in docs (#1903)Sebastián Ramírezbefore adoptione60a33e
line 16why, one step back16$ uv add typer📝 Update link syntax to minimal Markdown (#1623)Sebastián Ramírezbefore adoption3780a29
lines 17–20why, one step back17```1819</div>20📝 Recommend uv projects by default in docs (#1903)Sebastián Ramírezbefore adoptione60a33e
line 21why, one step back21`uv` creates a virtual environment for the project automatically. You don't need to create or activate one yourself.📝 Update link syntax to minimal Markdown (#1623)Sebastián Ramírezbefore adoption3780a29
line 22why, one step back22📝 Recommend uv projects by default in docs (#1903)Sebastián Ramírezbefore adoptione60a33e
line 23why, one step back23Run commands inside the project environment with `uv run`, for example:📝 Update link syntax to minimal Markdown (#1623)Sebastián Ramírezbefore adoption3780a29
lines 24–27why, one step back2425<div class="termy">2627```console📝 Recommend uv projects by default in docs (#1903)Sebastián Ramírezbefore adoptione60a33e
line 28why, one step back28$ uv run python main.py📝 Update link syntax to minimal Markdown (#1623)Sebastián Ramírezbefore adoption3780a29
lines 29–32why, one step back29```3031</div>32📝 Recommend uv projects by default in docs (#1903)Sebastián Ramírezbefore adoptione60a33e
line 33why, one step back33## Learn More { #learn-more }📝 Update link syntax to minimal Markdown (#1623)Sebastián Ramírezbefore adoption3780a29
line 34why, one step back34📝 Recommend uv projects by default in docs (#1903)Sebastián Ramírezbefore adoptione60a33e
line 35why, one step back35Read the [Virtual Environments guide](https://tiangolo.com/guides/virtual-environments/) to learn how virtual environments work underneath, including activation and the alternative `python -m venv` and `pip` workflow.