# 使用 Homebrew, apk, pacman, apt, dnf 安装 cython

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

## 安装

```sh
sudo av install brew:cython
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install cython
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add cython
```

  证据: Alpine Linux edge package indexes: cython from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- pacman (92%):

```sh
sudo pacman -S cython
```

  证据: Arch Linux sync databases: cython from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- Debian apt (92%):

```sh
sudo apt install cython-doc
```

  证据: Debian stable package indexes: cython-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install python3-cython
```

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

## 软件包事实

- **软件包键:** brew:cython
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/cython>
- **版本:** 3.2.9
- **来源摘要:** Compiler for writing C extensions for the Python language
- **主页:** <https://cython.org/>
- **仓库:** <https://github.com/cython/cython>
- **上游文档:** <https://cython.org/>
- **许可证:** Apache-2.0
- **源码归档:** <https://files.pythonhosted.org/packages/f6/de/db48b8870e766cfea809986cc50c1e986c663a9ab7bafd0ac1a2512c4a26/cython-3.2.9.tar.gz>
- **最后更新:** 2026-07-25T10:55:22Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- cygdb (cli)
- cython (cli)
- cythonize (cli)
- cygdb (别名)
- cython (别名)
- cythonize (别名)

## 依赖

- python@3.14

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 3.2.9
- 管理器更新时间: 2026-07-25
- 本地数据: OK
- 上游仓库: https://cython.org/
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

Cython is an optimizing static compiler for Python and the extended Cython language. It translates Python-like code to C or C++ so developers can write CPython extension modules, wrap native libraries, and tune performance without abandoning Python syntax.

### 项目历史

The official Cython README says Cython was originally based on Greg Ewing's Pyrex and started as an early-2000s project. Cython kept the Python-extension-module idea but grew into a long-lived compiler with its own language features, type declarations, C/C++ interop, and CPython-version adaptation.

The official site describes Cython as a superset of Python that supports C/C++ functions and types, allowing generated C code to be compiled with major C/C++ compilers. The project repository was created on GitHub in 2010 and remains the active source for compiler, docs, and tooling.

### 采用历史

Cython became common infrastructure in the scientific Python and performance-sensitive Python ecosystem because it lets projects ship fast extension modules while retaining a Python-like development model. The official README states that Cython has more than 70 million PyPI downloads per month, which reflects broad use as a build-time dependency as well as a developer tool.

### 使用方式

Users install Cython, write .pyx modules or use pure-Python annotation mode, and run cython or cythonize to generate C/C++ code for extension builds. Common uses include wrapping external C libraries, optimizing numerical loops, interacting with NumPy arrays, embedding CPython, and maintaining generated C sources for reproducible builds.

### 为什么软件包爱好者会关心

Cython matters to package nerds because it sits at the boundary between source packages and compiled artifacts. A missing or mismatched Cython can decide whether a Python package builds from sdist, ships generated C, or requires wheels; it is one of the quiet tools behind many fast Python libraries.

### 时间线

- Early 2000s: Cython starts as a project based on Pyrex.
- 2010: cython/cython repository created on GitHub.
- 2011: Official site links the IEEE article 'Cython: The best of both worlds'.
- 2025: Official site lists Cython 3.1.4 as a stable release.
- 2026: GitHub releases show ongoing 3.2.x and 3.3.0 alpha development.

### Related projects

- Pyrex is the predecessor named by the official README.
- CPython is the primary runtime and C API target.
- NumPy, PyPy, Pythran, mypyc, Nuitka, and Numba are related ecosystems or comparison points listed in official Cython materials.

### 来源

- <https://cython.org/>
- <https://docs.cython.org/>
- <https://docs.cython.org/en/latest/src/quickstart/overview.html>
- <https://github.com/cython/cython>
- <https://github.com/cython/cython#readme>
- <https://api.github.com/repos/cython/cython>
- <https://api.github.com/repos/cython/cython/releases?per_page=5>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 源数据库详情

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

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

- Debian apt - cython-doc - 3.0.11+dfsg-2: normalized package name match | Debian stable package indexes: cython-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | C-Extensions for Python 3 (Documentation) | http://cython.org/
- Debian apt - cython3 - 3.0.11+dfsg-2+b1: normalized package name match | Debian stable package indexes: cython3 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | C-Extensions for Python 3 | http://cython.org/
- Ubuntu apt - cython-doc - 3.0.8-1ubuntu3: normalized package name match | Ubuntu 24.04 LTS package indexes: cython-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | C-Extensions for Python - documentation | http://cython.org/
- Ubuntu apt - cython3 - 3.0.8-1ubuntu3: normalized package name match | Ubuntu 24.04 LTS package indexes: cython3 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | C-Extensions for Python 3 | http://cython.org/
- apk - cython - 3.2.4-r2: normalized package name match | Alpine Linux edge package indexes: cython from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Cython is an optimising static compiler for both the Python & the extended Cython programming languages. | https://cython.org/
- apk - cython-doc - 3.2.4-r2: normalized package name match | Alpine Linux edge package indexes: cython-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Cython is an optimising static compiler for both the Python & the extended Cython programming languages. (documentation) | https://cython.org/
- apk - cython-pyc - 3.2.4-r2: normalized package name match | Alpine Linux edge package indexes: cython-pyc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Precompiled Python bytecode for cython | https://cython.org/
- dnf - python3-cython - 3.2.8-4.fc45: normalized package name match | Fedora Rawhide package metadata: python3-cython from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Language for writing Python extension modules | http://www.cython.org
- pacman - cython - 3.2.9-1: normalized package name match | Arch Linux sync databases: cython from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | C-Extensions for Python | https://cython.org


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://pkg.so/zh-hans/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [python@3.14](https://pkg.so/zh-hans/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [orc](https://pkg.so/zh-hans/brew/orc/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime.
- [c3c](https://pkg.so/zh-hans/brew/c3c/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime.
- [ldc](https://pkg.so/zh-hans/brew/ldc/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime.
- [llgo](https://pkg.so/zh-hans/brew/llgo/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime.
- [lisette](https://pkg.so/zh-hans/brew/lisette/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime.
- [dmd](https://pkg.so/zh-hans/brew/dmd/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime.
- [bigloo](https://pkg.so/zh-hans/brew/bigloo/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime.
- [nesc](https://pkg.so/zh-hans/brew/nesc/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime.
- [halide](https://pkg.so/zh-hans/brew/halide/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, compiler, language, language-runtime, performance.
- [hy](https://pkg.so/zh-hans/brew/hy/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, compiler, language, language-runtime, python.
- [swift](https://pkg.so/zh-hans/brew/swift/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, compiler, language, language-runtime, performance.

## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
