Best of both worlds: Comparing pnpm and uv Package Managers
Package management is at the heart of modern development workflows. For JavaScript/Node.js, pnpm has become a favorite for its speed and disk efficiency. For Python, uv is a new, blazing-fast package manager. But how do they compare, especially if you work across both ecosystems?
This post provides a side-by-side comparison of pnpm and uv—from installation to managing packages Python projects.
Contents
Introduction
- pnpm: A fast, disk space-efficient package manager for Node.js. It uses a content-addressable filesystem to save space and speed up installs.
- uv: A next-generation Python package manager written in Rust, designed for speed.
Installation
pnpm
Standalone Script (POSIX)
curl -fsSL https://get.pnpm.io/install.sh | shHomebrew
brew install pnpmnpm (if Node.js is already installed)
npm install -g pnpmCorepack (Node.js >= 16.13)
corepack enable pnpm
uv
Standalone Script (POSIX)
curl -LsSf https://astral.sh/uv/install.sh | shHomebrew
brew install uvPyPI (Python required)
pipx install uv
# or
pip install uvCargo (Rust required)
cargo install --git https://github.com/astral-sh/uv uv
Installing Node.js & Python
pnpm
- pnpm can install Node.js via its own command:
pnpm env use --global <node_version>- Or use Node.js installed by other means (nvm, asdf, system package manager).
uv
- uv can install Python versions for you:
uv python install 3.13- uv manages Python environments and can create isolated environments for projects.
Installing Packages
pnpm (Node.js)
pnpm add <package>- Installs Node.js packages, supports monorepos, and workspaces.
uv (Python)
uv pip install <package>uv pipis a drop-in replacement for pip, but much faster.
Summary Table
| Feature | pnpm 🧶 | uv ⚡ |
|---|---|---|
| Language Support 🌐 | Node.js 🟢 | Python 🐍 |
| Install via Script 📜 | ✅ Yes | ✅ Yes |
| Install via Homebrew 🍺 | ✅ Yes | ✅ Yes |
| Install via PyPI 🐍 | ❌ No | ✅ Yes |
| Install via Cargo 🦀 | ❌ No | ✅ Yes |
| Node.js Version Mgmt 🟢 | ✅ Yes (pnpm env use) |
❌ No |
| Python Version Mgmt 🐍 | ❌ No | ✅ Yes (uv python install) |
| Add Package 📦 | pnpm add <pkg> |
uv pip install <pkg> |
| Monorepo/Workspaces 🏗️ | ✅ Yes | ✅ Yes |
| Self-update ⬆️ | pnpm self-update |
uv self update |
Conclusion
Both pnpm and uv are pushing the boundaries of package management in their respective ecosystems. If you work primarily with Node.js, pnpm is a proven, robust choice. If you work with Python, uv offers a compelling, unified workflow with impressive speed.
Try both and see which fits your workflow best!
One bonus: both pnpm and uv use similar command verbs (like add, install, and update), making it easier to switch between Node.js and Python projects if you work across both ecosystems.