# Install cython with Homebrew, apk, apt, dnf, pacman

Compiler for writing C extensions for the Python language. Version 3.2.8 via Homebrew; verified 2026-07-01.

## Install

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

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install cython
```

  Evidence: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add cython
```

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

- Debian apt (92%):

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

  Evidence: 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
```

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

- pacman (92%):

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

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

## Package facts

- **Package key:** brew:cython
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/cython>
- **Version:** 3.2.8
- **Source summary:** Compiler for writing C extensions for the Python language
- **Homepage:** <https://cython.org/>
- **Repository:** <https://github.com/cython/cython>
- **Upstream docs:** <https://cython.org/>
- **License:** Apache-2.0
- **Source archive:** <https://files.pythonhosted.org/packages/b6/6b/80101e02ebacaf9232ecf32bf6a788d36b27d820ee02434746252569ef98/cython-3.2.8.tar.gz>
- **Last updated:** 2026-07-01T09:53:57Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- cygdb (cli)
- cython (cli)
- cythonize (cli)
- cygdb (alias)
- cython (alias)
- cythonize (alias)

## Dependencies

- python@3.14

## Build dependencies

- python-setuptools

## 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: 3.2.8
- Package-manager updated: 2026-07-01
- Local data: ok
- Upstream repository: https://cython.org/
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

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.

### Project history

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.

### Adoption history

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.

### How it is used

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.

### Why package nerds care

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.

### Timeline

- 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.

### Sources

- <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>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

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

## Other Package-Manager Records

- 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.4-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/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Language for writing Python extension modules | http://www.cython.org
- pacman - cython - 3.2.5-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


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow 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.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [python@3.14](https://www.automicvault.com/pkg/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [halide](https://www.automicvault.com/pkg/brew/halide/) - Shares av.db curated category or tags: cli, compiler, language-runtime, performance.
- [c3c](https://www.automicvault.com/pkg/brew/c3c/) - Shares av.db curated category or tags: cli, compiler, language-runtime.
- [dmd](https://www.automicvault.com/pkg/brew/dmd/) - Shares av.db curated category or tags: cli, compiler, language-runtime.
- [flang](https://www.automicvault.com/pkg/brew/flang/) - Shares av.db curated category or tags: cli, compiler, language-runtime.
- [ghc](https://www.automicvault.com/pkg/brew/ghc/) - Shares av.db curated category or tags: cli, compiler, language-runtime.
- [idris2](https://www.automicvault.com/pkg/brew/idris2/) - Shares av.db curated category or tags: cli, compiler, language-runtime.
- [inform6](https://www.automicvault.com/pkg/brew/inform6/) - Shares av.db curated category or tags: cli, compiler, language-runtime.
- [ldc](https://www.automicvault.com/pkg/brew/ldc/) - Shares av.db curated category or tags: cli, compiler, language-runtime.
- [coconut](https://www.automicvault.com/pkg/brew/coconut/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, compiler, language, language-runtime, python.
- [hy](https://www.automicvault.com/pkg/brew/hy/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, compiler, language, language-runtime, python.

## Combined YAML source

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


## Sources

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