mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
30 lines
641 B
Plaintext
30 lines
641 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# uv venv
|
|
|
|
> Create an isolated Python environment for installing packages.
|
|
> More information: <https://docs.astral.sh/uv/reference/cli/#uv-venv>.
|
|
|
|
- Create a virtual environment in the default location (`.venv`):
|
|
|
|
`uv venv`
|
|
|
|
- Create a virtual environment at a specific path:
|
|
|
|
`uv venv {{path/to/venv}}`
|
|
|
|
- Create using a specific Python version:
|
|
|
|
`uv venv --python {{3.12}}`
|
|
|
|
- Create with a custom prompt prefix:
|
|
|
|
`uv venv --prompt {{my_project}}`
|
|
|
|
- Create and allow overwriting existing environment:
|
|
|
|
`uv venv --allow-existing {{venv_name}}`
|