You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
Virtual Environment Management
# Initial with a typical UV project structure (e.g., pyproject.toml, uv.lock, README.md, etc)
uv init [directory]
# Create venv in .venv automatically
uv venv
# add package dependency to pyproject.toml
uv add [package]
# Create a virtual environment
uv venv
# Create a virtual environment with specific Python version
uv venv --python=python3.10 [directory]
# Activate virtual environment (in bash/zsh)source [directory]/bin/activate
Package Installation
# Install packages
uv pip install [package]
# Install from requirements.txt
uv pip install -r requirements.txt
# Install with specific Python version
uv pip --python=python3.10 install [package]
# Install development packages
uv pip install -e .
Package Management
# List installed packages
uv pip list
# Show package information
uv pip show [package]
# Upgrade a package
uv pip install --upgrade [package]
# Uninstall a package
uv pip uninstall [package]
Tool Installation
# Install Python tools (like ruff, black, etc.)
uv tool install [tool]
# Install a specific version
uv tool install [tool]==[version]