crewai - ✅(Solved) Fix 1.9.3 cannot be installed because tokenizers 0.20.3 [2 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
crewAIInc/crewAI#4550Fetched 2026-04-08 00:41:27
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
cross-referenced ×2closed ×1commented ×1referenced ×1

Error Message

╰─▶ TOML parse error at line 1, column 1

Root Cause

help: tokenizers (v0.20.3) was included because crewai (v1.9.3) depends on tokenizers

Fix Action

Fixed

PR fix notes

PR #4551: Fix #4550: Update tokenizers dependency to >=0.21 to fix broken sdist

Description (problem / solution / changelog)

Fix #4550: Update tokenizers dependency to >=0.21 to fix broken sdist

Summary

tokenizers==0.20.3 has a broken pyproject.toml (missing project.version field), causing installation failures when uv needs to build from source (sdist). This changes the constraint from ~=0.20.3 (locked to 0.20.x) to >=0.21,<1, which resolves to tokenizers==0.22.2 in the lock file.

tokenizers is not directly imported anywhere in the crewai source — it's a transitive dependency (used by chromadb and others).

Added 4 regression tests to guard against re-introducing the broken version range.

Review & Testing Checklist for Human

  • Verify the uv.lock regeneration didn't introduce unintended dependency bumps. The lock file was fully regenerated (not surgically patched), so many packages beyond tokenizers changed versions (e.g., a2a-sdk 0.3.22→0.3.24, numpy resolution splits by Python version). Skim the lock diff for anything concerning — the diff is very large.
  • Evaluate whether >=0.21,<1 is too broad a range. The old constraint was very tight (~=0.20.3). A narrower range like ~=0.22.0 might be more appropriate for this project's pinning style. Consider whether chromadb or other transitive consumers of tokenizers have compatibility concerns with future tokenizers releases.
  • Run the full test suite to confirm the lock file changes don't break anything beyond what CI covers. CI passed on all four Python versions (3.10–3.13), but integration-level issues from transitive version bumps may not surface in unit tests.

Notes

Changed files

  • lib/crewai/pyproject.toml (modified, +1/-1)
  • lib/crewai/tests/test_dependency_constraints.py (added, +59/-0)
  • uv.lock (modified, +4553/-4319)

PR #4677: fix(deps): bump tokenizers lower bound to >=0.21

Description (problem / solution / changelog)

tokenizers 0.20.3 has a broken pyproject.toml (missing project.version), causing uv installs to fail.

Bumps lower bound to >=0.21 which resolves cleanly.

Closes #4550

Changed files

  • lib/crewai/pyproject.toml (modified, +1/-1)
  • uv.lock (modified, +38/-67)

Code Example

$ uv tool install crewai
Resolved 128 packages in 369ms
  × Failed to download and build `tokenizers==0.20.3`
  ├─▶ Failed to parse:
`C:\Users\ztahi\AppData\Local\uv\cache\sdists-v9\pypi\tokenizers\0.20.3\FG5MpixO2GrV2GmCLXByU\src\pyproject.toml`
  ╰─▶ TOML parse error at line 1, column 1
        |
      1 | [project]
        | ^^^^^^^^^
      `pyproject.toml` is using the `[project]` table, but the required `project.version` field is neither set nor present in the   
      `project.dynamic` list

  help: `tokenizers` (v0.20.3) was included because `crewai` (v1.9.3) depends on `tokenizers`
RAW_BUFFERClick to expand / collapse

tokenizers~=0.20.3 is missing the version in their pyproject.toml, but 1.9.3 depends on it. That means if you try uv tool install "crewai==1.9.3", it would break with the following:

$ uv tool install crewai
Resolved 128 packages in 369ms
  × Failed to download and build `tokenizers==0.20.3`
  ├─▶ Failed to parse:
`C:\Users\ztahi\AppData\Local\uv\cache\sdists-v9\pypi\tokenizers\0.20.3\FG5MpixO2GrV2GmCLXByU\src\pyproject.toml`
  ╰─▶ TOML parse error at line 1, column 1
        |
      1 | [project]
        | ^^^^^^^^^
      `pyproject.toml` is using the `[project]` table, but the required `project.version` field is neither set nor present in the   
      `project.dynamic` list

  help: `tokenizers` (v0.20.3) was included because `crewai` (v1.9.3) depends on `tokenizers`

extent analysis

Fix Plan

To fix the issue, we need to update the tokenizers version to at least 0.23 which includes the required project.version field in the pyproject.toml file.

Step-by-Step Solution

  • Update the crewai version to one that depends on tokenizers version 0.23 or higher, if available.
  • Alternatively, install tokenizers version 0.23 or higher separately before installing crewai:
    • Run uv tool install "tokenizers==0.23.0" (or a higher version)
    • Then run uv tool install "crewai==1.9.3"

Example Code

No code changes are required. The issue can be resolved by updating the package versions.

Verification

After updating the tokenizers version, try installing crewai again:

uv tool install "crewai==1.9.3"

If the installation is successful, the issue is resolved.

Extra Tips

  • Always check the dependencies of the packages you are installing to ensure they are compatible with each other.
  • Keep your packages up to date to avoid version conflicts and ensure you have the latest features and bug fixes.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING