Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

torch-stack

Install PyTorch ecosystem with automatic version compatibility via extras.

Motivation

PyTorch's ecosystem has complex version dependencies between torch, torchvision, torchaudio, and torchtext. Finding compatible versions is tedious and error-prone - this is the "PyTorch version hell."

Before torch-stack:

# Manual version hunting and compatibility checking
pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0

With torch-stack:

# Just specify torch version, get compatible ecosystem automatically
pip install torch-stack[vision,audio]==2.1.0

torch-stack solves this by:

  • 🎯 Extras notation: torch-stack[vision]==2.1.0 installs compatible versions
  • 📦 No manual lookup: Automatically resolves ecosystem compatibility
  • 🔄 Zero configuration: Works out of the box with correct version mapping

Installation

Basic Installation

# Base torch only
pip install torch-stack==2.1.0

# With torchvision (gets compatible 0.16.0)
pip install torch-stack[vision]==2.1.0

# With audio and vision
pip install torch-stack[vision,audio]==2.1.0

# Everything
pip install torch-stack[all]==2.1.0

CPU/CUDA Specific Installation

For specific hardware targets, use PyTorch's index URLs:

# CPU-only installation
pip install torch-stack[all]==2.1.0 --extra-index-url https://download.pytorch.org/whl/cpu

# CUDA 11.8
pip install torch-stack[all]==2.1.0 --extra-index-url https://download.pytorch.org/whl/cu118

# CUDA 12.1
pip install torch-stack[all]==2.1.0 --extra-index-url https://download.pytorch.org/whl/cu121

Available Index URLs

  • CPU: https://download.pytorch.org/whl/cpu
  • CUDA 11.8: https://download.pytorch.org/whl/cu118
  • CUDA 12.1: https://download.pytorch.org/whl/cu121
  • ROCm 5.6: https://download.pytorch.org/whl/rocm5.6

Note: torch-stack resolves version compatibility; the index URL determines CPU/GPU variant.

Usage

Simple Installation

Replace your manual PyTorch installs:

# Instead of researching compatible versions:
pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0

# Just use:
pip install torch-stack[vision,audio]==2.1.0

In requirements.txt

# Before: manual compatibility management
torch==2.1.0
torchvision==0.16.0
torchaudio==2.1.0

# After: automatic compatibility
torch-stack[vision,audio]==2.1.0

In pyproject.toml

[project]
dependencies = [
    "torch-stack[vision,audio]==2.1.0"
]

Available Extras

  • vision - Installs compatible torchvision
  • audio - Installs compatible torchaudio
  • text - Installs compatible torchtext

Python API (for package maintainers)

from torch_stack.resolver import VersionResolver

# Get compatible versions programmatically
torch_ver = "2.1.0"
vision_ver = VersionResolver.torchvision(torch_ver)  # "0.16.0"
audio_ver = VersionResolver.torchaudio(torch_ver)  # "2.1.0"

Supported Versions

  • PyTorch 1.8+ through latest
  • Handles version exceptions and edge cases
  • CPU and CUDA installation support

No more PyTorch version hell 🎉

Metadata

Release files for pytorch-stack 0.0.0.dev0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytorch-stack 0.0.0.dev0
File Size Uploaded
pytorch_stack-0.0.0.dev0.tar.gz 10.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytorch-stack 0.0.0.dev0
File Interpreter ABI Platform
pytorch_stack-0.0.0.dev0-py3-none-any.whl Python 3 none any Details

Total release size: 20.4 kB

Release files / pytorch_stack-0.0.0.dev0.tar.gz

Download URL pytorch_stack-0.0.0.dev0.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
26b756a8494e65058fd8d2756becda8e5d704cca3a806665a859913b7da1a2d1
BLAKE2b-256 checksum
How to use checksums
f5f7db37c5f50e6a00a73c9c753168c4b642e90e1b58700f0ad26b06dacb2478
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.0 CPython/3.12.3

Release files / pytorch_stack-0.0.0.dev0-py3-none-any.whl

Download URL pytorch_stack-0.0.0.dev0-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a195a817015d5ba1179b04189ce5833759132ec3b5a775bed42fc9b9e174388a
BLAKE2b-256 checksum
How to use checksums
5c404ac4aa61241ba1d7b8dd67ed24cc1584a69e6b095c430d2011ec926c9a44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.0.0.dev0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page