Skip to content
← Back to activity

Public problem

ai21 SDK installation fails on Python 3.13 (sentencepiece==0.2.0 has no 3.13 support)

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

On Python 3.13, pip install ai21 (or uv add ai21) failed because one of the SDK's pinned dependencies, sentencepiece==0.2.0, did not support Python 3.13 yet. The reporter hit this on Windows 11, but the dependency pin was the cause regardless of OS. The AI21 maintainers shipped Python 3.13 support in SDK v4.0.0.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

This was fixed upstream. The blocker was the sentencepiece==0.2.0 pin, which had no Python 3.13 support. Upgrade to ai21 SDK v4.0.0 or later, which added Python 3.13 support, per the maintainers. Source: https://github.com/AI21Labs/ai21-python/issues/293

Source: https://github.com/AI21Labs/ai21-python/issues/293