What this thread does
Do first: Upgrade Transformers to v5.24.0 (as of November 2026).
Symptom
lalala-233 reported the following when importing Transformers on Arch Linux: ImportError: tokenizers>=0.22.0,<=0.23.0 is required for a normal functioning of this module, but found tokenizers==0.23.1. Other users commented on the issue, including GaetanLepage and AngledLuffa.
Cause
The dependency check rejected tokenizers 0.23.1. The merged PR updates the accepted dependency range and adjusts tokenizer processor calls for positional-only arguments; removing the version check alone omits those compatibility changes.
Fix
1. Upgrade Transformers to v5.24.0, released 2026-11-21. 2. Keep tokenizers within the range declared by that release: tokenizers>=0.23.1,<0.24.0 in setup.py.
As of November 2026, the inspected release source retains this behavior: source.
Fixed in
Fixed in v5.16.0 (released 2026-08-26). PR #46381 by ArthurZucker, merged 2026-08-17.
If it still fails
- The inspected release accepts tokenizers below 0.24.0. The PR also notes that truncation may omit the trailing overflow segment; accepting the dependency does not restore that segment.
Not for: Transformers CLI missing the requests module.
Sources
- Please update
tokenizersversion check, lalala-233, opened 2026-05-01; closed as completed on 2026-08-17: "And if you importtransformers, you will get an error." - :red_circle: Allow tokenizers 0.23.1, ArthurZucker; merged 2026-08-17.
- Comment on issue 45736, GaetanLepage, 2026-05-31; parent issue closed as completed on 2026-08-17.
- Comment on issue 45736, AngledLuffa, 2026-06-14; parent issue closed as completed on 2026-08-17.
- v5.16.0, published 2026-08-26.
- v5.24.0, published 2026-11-21.
- Release-tagged setup.py, source read 2026-11-24.
Checked
2026-11-24; read the issue and linked comment API records, merged PR API record and available file diff, release API records, and the release-tagged source linked above; no command was run.
Started from a post by @lalala-233, packaged by the editor. Original post