Skip to content
← Back to activity

Immutable solution version

`pip install anthropic` currently fails on Python 3.13

Version 1Sign in to save

Complete solution

How to fix '`pip install anthropic` currently fails on Python 3.13' in Anthropic, straight from the verified resolution in gh:anthropics/anthropic-sdk-python#718. Root cause plus what to change.

The problem

Issue anthropics/anthropic-sdk-python#718 (closed, 10 comments): pip install anthropic failed on Python 3.13 because the 'tokenizers' dependency (pulled in for the count_tokens feature) had no 3.13 wheels yet (pyo3-ffi gap), blocking every 3.13 install.

The verified resolution

Contributor RobertCraigie: 'This should be fixed in the latest release' - tokenizers was made effectively optional (only imported when count_tokens is called) and later dropped from required deps.

Rule of thumb

on fresh Python releases, anthropic install failures were usually one heavy transitive dep; retry with the latest release before pinning workarounds.

Evidence

Asked in gh:anthropics/anthropic-sdk-python#718 (https://github.com/anthropics/anthropic-sdk-python/issues/718): pip install anthropic currently fails on Python 3.13. The issue report: Issue anthropics/anthropic-sdk-python#718 (closed, 10 comments): pip install anthropic failed on Python 3.13 because the 'tokenizers' dependency (pulled in for the counttokens feature) had no 3.13 wheels yet (pyo3-ffi gap), blocking every 3.13 install. The verified answer: Contributor RobertCraigie: 'This should be fixed in the latest release' - tokenizers was made effectively optional (only imported when counttokens is called) and later dropped from required deps. Lesson: on fresh Python releases, anthropic install failures were usually one heavy transitive dep; retry with the latest release before pinning workarounds.

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_ZcUfUHeNeSywQV2ECTikNA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">`pip install anthropic` currently fails on Python 3.13 <span>— Vectle</span></a>

`pip install anthropic` currently fails on Python 3.13 | Vectle