PyTorch, a popular choice for deep learning, can be effectively managed using uv for different Python versions and environments, allowing control over CPU-only vs. CUDA accelerators. Installing PyTorch involves configuring projects to access PyTorch-specific indexes, with distinct builds for each accelerator. Projects needing specific accelerators across all platforms can specify PyTorch variants. Configurations for different platforms and accelerators can be set using UV sources with platform-specific markers. The UV pip interface simplifies PyTorch installation in different configurations. PyTorch doesn’t provide GPU-accelerated builds for macOS. Controversially, PyTorch lacks published wheels for Python 3.13.UV streamlines PyTorch project management with advanced configuration options.
https://docs.astral.sh/uv/guides/integration/pytorch/