Skip to content
Myr

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 file

Take it

The walk stopped after 200 commits: lines older than 5bc1ee1 point at it.

⬆ Bump actions/cache from 5.0.4 to 5.0.5 (#1700)dependabot[bot]before adoption5bc1ee1

lines 1–2why, one step back
1# Virtual Environments
2

📝 Recommend uv projects by default in docs (#1903)Sebastián Ramírezbefore adoptione60a33e

line 3why, one step back
3When you work with Python projects, you should use a **virtual environment** to isolate the packages installed for each project.

⬆ Bump actions/cache from 5.0.4 to 5.0.5 (#1700)dependabot[bot]before adoption5bc1ee1

line 4why, one step back
4

📝 Recommend uv projects by default in docs (#1903)Sebastián Ramírezbefore adoptione60a33e

line 5why, one step back
5For Typer projects, I recommend using [uv](https://docs.astral.sh/uv/) to manage the project, its dependencies, and its virtual environment.

⬆ Bump actions/cache from 5.0.4 to 5.0.5 (#1700)dependabot[bot]before adoption5bc1ee1

line 6why, one step back
6

📝 Recommend uv projects by default in docs (#1903)Sebastián Ramírezbefore adoptione60a33e

line 7why, one step back
7## Create a Project { #create-a-project }

⬆ Bump actions/cache from 5.0.4 to 5.0.5 (#1700)dependabot[bot]before adoption5bc1ee1

line 8why, one step back
8

📝 Recommend uv projects by default in docs (#1903)Sebastián Ramírezbefore adoptione60a33e

line 9why, one step back
9Install `uv` using the [official installation guide](https://docs.astral.sh/uv/getting-started/installation/), and then create a project:

⬆ Bump actions/cache from 5.0.4 to 5.0.5 (#1700)dependabot[bot]before adoption5bc1ee1

lines 10–13why, one step back
10
11<div class="termy">1213```console

📝 Recommend uv projects by default in docs (#1903)Sebastián Ramírezbefore adoptione60a33e

line 14why, one step back
14$ uv init awesome-project --bare

⬆ Bump actions/cache from 5.0.4 to 5.0.5 (#1700)dependabot[bot]before adoption5bc1ee1

line 15why, one step back
15$ cd awesome-project

📝 Recommend uv projects by default in docs (#1903)Sebastián Ramírezbefore adoptione60a33e

line 16why, one step back
16$ uv add typer

⬆ Bump actions/cache from 5.0.4 to 5.0.5 (#1700)dependabot[bot]before adoption5bc1ee1

lines 17–20why, one step back
17```
1819</div>20

📝 Recommend uv projects by default in docs (#1903)Sebastián Ramírezbefore adoptione60a33e

line 21why, one step back
21`uv` creates a virtual environment for the project automatically. You don't need to create or activate one yourself.

⬆ Bump actions/cache from 5.0.4 to 5.0.5 (#1700)dependabot[bot]before adoption5bc1ee1

line 22why, one step back
22

📝 Recommend uv projects by default in docs (#1903)Sebastián Ramírezbefore adoptione60a33e

line 23why, one step back
23Run commands inside the project environment with `uv run`, for example:

⬆ Bump actions/cache from 5.0.4 to 5.0.5 (#1700)dependabot[bot]before adoption5bc1ee1

lines 24–27why, one step back
24
25<div class="termy">2627```console

📝 Recommend uv projects by default in docs (#1903)Sebastián Ramírezbefore adoptione60a33e

line 28why, one step back
28$ uv run python main.py

⬆ Bump actions/cache from 5.0.4 to 5.0.5 (#1700)dependabot[bot]before adoption5bc1ee1

lines 29–32why, one step back
29```
3031</div>32

📝 Recommend uv projects by default in docs (#1903)Sebastián Ramírezbefore adoptione60a33e

line 33why, one step back
33## Learn More { #learn-more }

⬆ Bump actions/cache from 5.0.4 to 5.0.5 (#1700)dependabot[bot]before adoption5bc1ee1

line 34why, one step back
34

📝 Recommend uv projects by default in docs (#1903)Sebastián Ramírezbefore adoptione60a33e

line 35why, one step back
35Read 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.