# pyenchant: Python bindings for the Enchant spellchecker, and the ctypes glue behind them

> pyenchant gives Python code a spellchecking and suggestion API by wrapping the Enchant C library through ctypes, which means Enchant itself has to be present on the machine before the package does anything useful. The README is blunt about that, and the repository shows a project whose install story is the hard part.

**pyenchant/pyenchant** — spellchecking library for python

- Repository: https://github.com/pyenchant/pyenchant
- Website: https://pyenchant.github.io/pyenchant/
- Stars: 622 · Forks: 101
- Language: Python
- License: LGPL-2.1
- Published: 2026-10-22 · Updated: 2026-10-22 · Language: en
- Canonical page: https://hysenlabs.com/projects/pyenchant-pyenchant

## What the package actually wraps

pyenchant provides a set of Python language bindings for the Enchant spellchecking library. Enchant itself is the part that does the work, and the README describes it as being used to check the spelling of words and suggest corrections for words that are miss-spelled. The important detail is that Enchant is not a self-contained checker. It can use many popular spellchecking packages to perform the task, including ispell, aspell and MySpell, and it is flexible at handling multiple dictionaries and multiple languages. So the Python package is the interface layer, and the actual dictionary engines are third-party programs you install separately. Understanding that split is the difference between a smooth adoption and an afternoon of confusion.

## The ctypes glue is what makes the dependency unavoidable

The history section of the README explains why the binding is written the way it is. The glue to pull Enchant into Python via ctypes was written by Ryan Kelly, who needed a decent spellchecker for another project. The alternatives he found were either extremely non-portable, such as opening a pipe to ispell, or had completely disappeared from the web, and the README names SnakeSpell as one that vanished. Building the bridge with ctypes was also, in his words, a good excuse to learn about SWIG, ctypes, and a little of the Python and C APIs. The ctypes approach has a direct consequence for anyone deploying this. The library loads Enchant at runtime through the platform's shared library mechanism, so the Enchant binary and its dictionaries have to exist on the machine, and the versions have to be compatible. A wheel cannot carry that, so installation is a system-level operation rather than a pip operation.

## The README warns you before you install, not after

The How do I use PyEnchant section leads with a warning rather than a quick start. It states that in general, PyEnchant will not work out of the box after having been installed with pip, or any other installation method, and points at the project documentation for more details. The website for the project is at pyenchant.github.io/pyenchant, and the Enchant project's own site is linked as well, at rrthomas.github.io/enchant. The repository is a single Python package directory named `enchant`, with the `pyproject.toml` and `setup.py` at the root, a `setup.cfg`, a `MANIFEST.in`, and a `tox.ini` for test environments. There is also a `bootstrap.py` and a `build_artifacts.py`, plus a `tools/` directory, and a `website/` directory that holds the documentation site. The presence of the `website` directory is a good sign, because it means the platform specific install instructions live in the repository rather than only on a website.

## Multiple dictionaries and languages are the reason to use Enchant at all

If you only need a list of known misspellings, a spellchecking library built on a word list would be simpler and would have no native dependency. The reason to reach for Enchant is the flexibility the README names, handling multiple dictionaries and multiple languages, on top of a set of backends including ispell, aspell and MySpell. In practice that means a document can be checked against one dictionary while proper nouns are checked against another, and that a user can pick a language for their locale without the application carrying the dictionary itself. The design also means the choice of backend is a deployment decision rather than an application decision, since the same Python code works against whichever engine is installed. That is a genuine advantage for a project shipping to desktops with different software already present, and it is exactly what the ctypes design makes possible.

## Three named maintainers and a long gap between the tag and the last commit

The maintenance story here needs the two dates read together. The credit for Enchant itself goes to Dom Lachowicz, the README calls Enchant a high-quality library, and points to the Enchant website for details. The ctypes glue was written by Ryan Kelly, who later stepped down from the project, after which Dimitri Merejkowsky became the new maintainer. The release list shows v3.2.0 on 2020-12-08, v3.2.1 on 2021-06-24, and v3.2.2 on 2021-10-05, with the last push on 2026-06-04. So the published versions on PyPI are from 2021, while the repository has seen considerably more recent work. There is no statement in the README about a maintenance policy or a support window, so treat the version numbers and the commit history as separate facts rather than assuming either one implies the other.

## LGPL and a codebase that mixes packaging, tests, and docs

The licence is LGPL-2.1, with the terms in the LICENSE.txt file at the repository root. For a Python binding that loads a shared library at runtime, that is a sensible choice, and it keeps the package usable inside a larger application without the copyleft obligations that would attach to a GPL library linked into proprietary code. The repository layout says something about the project's shape. There are `tests/` for the test suite, a `tox.ini` for running it across environments, a `.coveragerc` for coverage measurement, and a `.github/` directory for the workflow, and a `builds.sr.ht` badge in the README points to a SourceHut build as well as the GitHub Actions workflow. There is a `tbump.toml`, which is the version bump configuration, matching the release naming you see in the tags, a `Changelog` file, and a `TODO.txt` listing outstanding work. The `.gitmodules` file and `MANIFEST.in` are the kind of entries a package needs when it ships data alongside its code.

## Where pyenchant is the wrong choice

There are two clear cases where this is the wrong tool, and both come from the same source. The first is a deployment environment where you cannot install native software. A container image built to be immutable, a serverless function with a read-only filesystem, a locked-down managed platform, or a package you ship to users who will not run an installer. In those places a pure Python checker with an embedded word list is the answer, and the trade-off is that you lose the multiple dictionary and multiple language handling that Enchant gives you. The second case is a project that needs to be reproducible. If two developers on the same commit can get different spellchecking results because they have different Enchant versions and different dictionary packages installed, then the checker is not part of your build. For either of those situations, the right move is a self-contained checker, and pyenchant is the wrong dependency.

## Conclusion

pyenchant fits a Python application that needs real dictionary based spellchecking, with support for multiple dictionaries and multiple languages, and that is prepared to depend on a native library being present on the target machine. It is the wrong tool for a service that must install cleanly with pip alone, since the README states outright that it will not work out of the box after installation, and it is the wrong tool if you need a checker that runs identically everywhere without native dependencies. Before adopting it, read the project documentation for the platform specific install steps, and pin a version deliberately, because the newest tagged release is v3.2.2 from 2021 while the last push was on 2026-06-04.

## FAQ

### Does pyenchant work right after pip install?

No. The README warns that in general PyEnchant will not work out of the box after having been installed with pip, or any other installation method, and points at the project documentation for the platform specific steps. The Enchant library and its dictionaries have to be installed separately.

### How does pyenchant talk to the Enchant library?

Through ctypes. The README credits Ryan Kelly with writing the glue to pull Enchant into Python via ctypes, chosen after the alternatives he found were either extremely non-portable, such as opening a pipe to ispell, or had disappeared from the web.

### Which spellchecking backends can pyenchant use?

Enchant can use many popular spellchecking packages, including ispell, aspell and MySpell. The README also notes that Enchant is flexible at handling multiple dictionaries and multiple languages.

### What is the latest pyenchant release?

The most recent listed release is v3.2.2 from 2021-10-05, after v3.2.1 in June 2021 and v3.2.0 in December 2020. The last push to the repository was on 2026-06-04, and the project is licensed under LGPL-2.1.

### Who maintains pyenchant?

The README credits Dom Lachowicz for Enchant itself, Ryan Kelly for the original ctypes glue, and states that after Ryan stepped down from the project, Dimitri Merejkowsky became the new maintainer.

## Sources

- [License: LGPL-2.1](https://github.com/pyenchant/pyenchant/blob/main/LICENSE)
- [Project website](https://pyenchant.github.io/pyenchant/)
- [pyenchant/pyenchant on GitHub](https://github.com/pyenchant/pyenchant)
- [README](https://github.com/pyenchant/pyenchant/blob/main/README.md)
- [Releases](https://github.com/pyenchant/pyenchant/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/pyenchant-pyenchant
