Mustafa CavusogluMC

Command Palette

Search for a command to run...

AboutExperiencesProjects
Linux3Docker3Git3uv1Miniconda1Kubernetes3
Back to Home
uv

Fast Python package and project management with uv

pythonpackagesvirtual-envfast

uv Package Manager

Ultra-fast Python package and project management.

Installation

# Install uv (macOS/Linux)
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install via pip
pip install uv

# Install via Homebrew
brew install uv

Project Management

# Create a new project
uv init my-project

# Create project with specific Python
uv init --python 3.12 my-project

# Sync dependencies
uv sync

# Add a dependency
uv add requests

# Add dev dependency
uv add --dev pytest

# Remove a dependency
uv remove requests

Package Management

# Install packages
uv pip install requests

# Install from requirements.txt
uv pip install -r requirements.txt

# Install in editable mode
uv pip install -e .

# Compile requirements
uv pip compile requirements.in -o requirements.txt

# Sync environment with requirements
uv pip sync requirements.txt

Virtual Environments

# Create virtual environment
uv venv

# Create with specific Python version
uv venv --python 3.12

# Activate (Unix)
source .venv/bin/activate

# Activate (Windows)
.venv\Scripts\activate

Running Python

# Run a script
uv run python script.py

# Run with specific package
uv run --with requests python -c "import requests"

# Run a tool
uv tool run ruff check .