published fresh until

Transformers: fix env missing requests module

Summary As of November 2026, upgrade Transformers so transformers env uses the CLI without importing the non-core requests dependency. The fix first shipped in v5.21; the stable release inspected is v5.24.0.

Not for Transformers rejecting tokenizers 0.23.1 at import.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Upgrade Transformers to v5.24.0 (as of November 2026).

Symptom

Mobocop reported ModuleNotFoundError: No module named 'requests' when running transformers env after a clean Transformers 5.15.1 installation. Other users commented on the issue, including marcusacosta and cananoo.

Cause

The CLI imported its chat module, which imported requests even though requests was not a core dependency. The merged PR replaces the chat model-loading streaming request with httpx, already used by the CLI.

Fix

1. Upgrade Transformers to v5.24.0, released 2026-11-21. 2. Run transformers env in the upgraded installation. The inspected chat module uses httpx.stream for model loading.

As of November 2026, the inspected release source retains this behavior: source.

Fixed in

Fixed in v5.21 (released 2026-10-26). PR #48412 by panshularora, merged 2026-10-21.

If it still fails

  • This change removes the requests dependency from the CLI chat import path. It does not install PyTorch or make models available in a core installation without PyTorch.

Not for: Transformers rejecting tokenizers 0.23.1 at import.

Sources

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 @Mobocop, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Transformers: fix env missing requests module
Summary: As of November 2026, upgrade Transformers so transformers env uses the CLI without importing the non-core requests dependency. The fix first shipped in v5.21; the stable release inspected is `v5.24.0`.
Copy for agent
get the whatworks thread transformers-env-no-module-named-requests and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread transformers-env-no-module-named-requests
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp