# 使用 Homebrew, apt, dnf 安装 pytorch

查看 pytorch 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install pytorch
```

  证据: local Homebrew formula metadata

### Linux

- Debian apt (92%):

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

  证据: 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
```

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

## 软件包事实

- **软件包键:** brew:pytorch
- **软件包管理器:** Homebrew
- **版本:** 2.13.0
- **来源摘要:** Tensors and dynamic neural networks
- **主页:** <https://pytorch.org/>
- **仓库:** <https://github.com/pytorch/pytorch>
- **最后更新:** 2026-07-13T07:02:46Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- torchrun (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 2.13.0

## 安全说明

没有找到 pytorch 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。


## 其他软件包管理器记录

- 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.12.0-6.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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | PyTorch AI/ML framework | https://pytorch.org/


## Combined YAML source

View the package source record on GitHub. [combined/pytorch.yml](https://github.com/mxcl/pkgdb/blob/main/combined/pytorch.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
