Offline Python package downloader with full dependency resolution.
Wheelhouse downloads Python wheel packages and all their transitive dependencies for a target platform — without needing to run on that platform. Perfect for preparing offline installations on air-gapped servers.
- Cross-platform downloads — Download wheels for Linux x86_64 or Windows AMD64 from any machine
- Full dependency resolution — Recursively resolves dependencies with backtracking and conflict detection
- PEP 658 metadata resolution — Fetches lightweight
.metadata(~5KB) to resolve dependencies without full wheel downloads - PEP 508 marker evaluation — Correctly filters platform-specific and optional dependencies
- PyTorch Hardware Backends — Built-in support for Intel GPU (
--torch-xpu), NVIDIA CUDA (--torch-cuda cu118,cu124,cu126,cu128), CPU, and ROCm - Dry-run mode — Preview resolved packages and version tree without downloading wheels (
--dry-run) - Index caching & resume — Caches package index locally as JSON and automatically resumes partial downloads (HTTP 206 / Range)
- Configurable — TOML configuration file + CLI overrides
pip install wheelhouseOr install from source:
git clone https://github.com/crimson-and-clover/wheelhouse.git
cd wheelhouse
pip install -e .# Download numpy and all its dependencies for Linux + Python 3.10
wheelhouse download numpy --python 3.10 --platform linux_x86_64
# Download from a requirements file
wheelhouse download -r requirements.txt --python 3.10 --platform linux_x86_64
# Download PyTorch with Intel XPU backend
wheelhouse download torch torchvision --torch-xpu
# Download PyTorch with CUDA 11.8 backend
wheelhouse download "torch==2.1.2+cu118" --torch-cuda cu118
# Preview dependency tree without downloading (dry run)
wheelhouse download -r requirements.txt --dry-run
# Fast concurrent download with 8 worker threads
wheelhouse download -r requirements.txt -j 8
# List supported platforms, Python versions, and PyTorch backends
wheelhouse list
# Specify custom output directory
wheelhouse download numpy -o ./my_wheels/from wheelhouse.config import Config
from wheelhouse.models import PackageRequirement
from wheelhouse.resolver import Resolver
from packaging.specifiers import SpecifierSet
config = Config(
python_version="3.10",
platform="linux_x86_64",
torch_backend="cu118",
)
requirements = [
PackageRequirement(package_name="numpy"),
PackageRequirement(package_name="requests", version_spec=SpecifierSet(">=2.28")),
]
with Resolver(config) as resolver:
resolved = resolver.resolve(requirements)
for name, pkg in resolved.items():
print(f"{name} == {pkg.version} -> {pkg.filepath}")Copy the wheels/ directory to the target machine, then:
pip install --no-index --find-links=wheels/ -r requirements.txt| Platform | Identifier |
|---|---|
| Linux x86_64 | linux_x86_64 (default) |
| Linux ARM64 | linux_aarch64 |
| Windows AMD64 | win_amd64 |
| macOS ARM64 (Apple Silicon) | macos_arm64 |
| macOS x86_64 (Intel) | macos_x86_64 |
To add a new platform, run wheelhouse dump-tags on a machine with the target OS and copy the generated JSON file into wheelhouse/data/platforms/.
- Python 3.10
- Python 3.11
- Python 3.12
- Python 3.13
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Lint
ruff check wheelhouse/ tests/