# Install pytorch with Homebrew, apt, dnf

Tensors and dynamic neural networks. Version 2.12.1 via Homebrew; verified 2026-06-22.

## Install

```sh
sudo av install brew:pytorch
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install pytorch
```

  Evidence: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install libtorch-dev
```

  Evidence: Debian stable package indexes: libtorch-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install python3-torch
```

  Evidence: Fedora Rawhide package metadata: python3-torch from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

## Package facts

- **Package key:** brew:pytorch
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/pytorch>
- **Version:** 2.12.1
- **Source summary:** Tensors and dynamic neural networks
- **Homepage:** <https://pytorch.org/>
- **Repository:** <https://github.com/pytorch/pytorch>
- **Upstream docs:** <https://pytorch.org/docs/stable/index.html>
- **License:** BSD-3-Clause
- **Source archive:** <https://github.com/pytorch/pytorch/releases/download/v2.12.1/pytorch-v2.12.1.tar.gz>
- **Last updated:** 2026-06-22T14:06:04-07:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- torchrun (cli)
- torchrun (alias)

## Dependencies

- abseil
- eigen
- libomp
- libuv
- libyaml
- numpy
- onnx
- openblas
- protobuf
- sleef

## Build dependencies

- cmake
- ninja
- python@3.14

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 2.12.1
- Package-manager updated: 2026-06-22
- Local data: ok
- Upstream repository: https://github.com/pytorch/pytorch
- info: No cached GitHub release or tag data was available.

## Security Notes

No matching local secret-handling manifest was found for pytorch. Nucleus package metadata is still published here so future coverage has a stable package URL.


## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** pytorch
- **Version Scheme:** 0
- **Revision:** 0
- **Requirements:** macos, xcode
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Debian apt - libtorch-dev - 2.6.0+dfsg-7: normalized package name match | Debian stable package indexes: libtorch-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Tensors and Dynamic neural networks in Python (Development Files) | https://pytorch.org/
- Debian apt - libtorch-test - 2.6.0+dfsg-7: normalized package name match | Debian stable package indexes: libtorch-test from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Tensors and Dynamic neural networks in Python (Test Binaries) | https://pytorch.org/
- Debian apt - libtorch2.6 - 2.6.0+dfsg-7: normalized package name match | Debian stable package indexes: libtorch2.6 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Tensors and Dynamic neural networks in Python (Shared Objects) | https://pytorch.org/
- Debian apt - python3-torch - 2.6.0+dfsg-7: normalized package name match | Debian stable package indexes: python3-torch from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Tensors and Dynamic neural networks in Python (Python Interface) | https://pytorch.org/
- dnf - python3-torch - 2.11.0-3.fc45: normalized package name match | Fedora Rawhide package metadata: python3-torch from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | PyTorch AI/ML framework | https://pytorch.org/


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [numpy](https://www.automicvault.com/pkg/brew/numpy/) - Runtime dependency declared by Homebrew.
- [cmake](https://www.automicvault.com/pkg/brew/cmake/) - Build dependency declared by Homebrew.
- [ninja](https://www.automicvault.com/pkg/brew/ninja/) - Build dependency declared by Homebrew.
- [python@3.14](https://www.automicvault.com/pkg/brew/python-3-14/) - Build dependency declared by Homebrew.
- [openai-whisper](https://www.automicvault.com/pkg/brew/openai-whisper/) - Popular package that depends on this formula.
- [pocket-tts](https://www.automicvault.com/pkg/brew/pocket-tts/) - Popular package that depends on this formula.
- [mlx](https://www.automicvault.com/pkg/brew/mlx/) - Shares av.db curated category or tags: cli, developer-tools, machine-learning, python.
- [crf++](https://www.automicvault.com/pkg/brew/crf/) - Shares av.db curated category or tags: cli, developer-tools, machine-learning.
- [dvc](https://www.automicvault.com/pkg/brew/dvc/) - Shares av.db curated category or tags: cli, developer-tools, machine-learning.
- [hf](https://www.automicvault.com/pkg/brew/hf/) - Shares av.db curated category or tags: cli, developer-tools, machine-learning.
- [hf-mcp-server](https://www.automicvault.com/pkg/brew/hf-mcp-server/) - Shares av.db curated category or tags: cli, developer-tools, machine-learning.
- [llama.cpp](https://www.automicvault.com/pkg/brew/llama-cpp/) - Shares av.db curated category or tags: cli, developer-tools, machine-learning.
- [mlx-lm](https://www.automicvault.com/pkg/brew/mlx-lm/) - Shares av.db curated category or tags: cli, developer-tools, machine-learning.
- [text-embeddings-inference](https://www.automicvault.com/pkg/brew/text-embeddings-inference/) - Shares av.db curated category or tags: cli, developer-tools, machine-learning.

## Combined YAML source

View the package source record on GitHub. [combined/pytorch.yml](https://github.com/automic-vault/db/blob/main/combined/pytorch.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
