Answers for LLM inference engineers

ImportError: cannot import name 'X' from 'gradio' (inputs, Box, IOComponent, ChatInterface, ...): which releases have it

Most of these errors come from gradio 4.0.0 (2023-10-31), which removed gr.inputs, gr.outputs, Box, Carousel, Variable, StatusTracker, interpretation and 13 more top-level names, and IOComponent from gradio.components; 3.50.2 is the last release that has them. Replace gr.inputs.Textbox(...) with gr.Textbox(...) (the same for every input and output class), Variable with State and Carousel with Gallery. To run old code unchanged, pin pip install "gradio<4.0.0"; on a Hugging Face Space the gradio version comes from sdk_version in the Space's README.md. The opposite error, a new name on an old gradio, means upgrading: ChatInterface needs 3.37.0, ChatMessage 4.38.0. For any other name, in any module of gradio, paste the error below.

Published 2026-11-25 · Data as of 2026-11-25 · gradio 3.0.1 to 6.32.0, the first release of each of 170 minor versions, with patch releases that differ noted · read from the source of each release, nothing was installed or run (how, limits) · Corrected 2026-12-05

Corrected on 2026-12-05: this page read only the first release of each minor version, so a name added or removed in a patch release was dated to the next minor. For example, gr.Component is in 5.13.2 (2025-01-29), not only from 5.14.0. Every release was then read once from PyPI: 40 top-level names (and 644 module-and-name pairs in all) differ in some patch release from the release this page read for the same minor. The lookup now gives those patch releases. The per-minor ranges and the tables are unchanged.

Examples:

Runs in your browser on gradio.json (185 KB); nothing you paste is sent anywhere. Covers 246 top-level names and 6,066 module-and-name pairs in 213 modules.

What did gradio 4.0.0 remove, and what replaces each name?

These 21 names left from gradio import ... (and gr.X) in 4.0.0, together with gradio.components.IOComponent. Where gradio named a replacement, it is quoted from the deprecation messages of 3.50.2; the lookup shows the same hints.

Removed in 4.0.0Use instead
gr.inputsthe components themselves: gr.Textbox(), gr.Image() and so on. gradio 3.50.2 said: "Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your component from gradio.components".
gr.outputsthe components themselves (gr.Textbox(), gr.Label(), ...); gradio.outputs was deprecated in 3.50.2 like gradio.inputs.
gr.Boxno named replacement; 3.50.2 marks Box "DEPRECATED". gr.Group() or gr.Column() are the layouts that remain.
gr.Carouselgr.Gallery(). gradio 3.50.2 said: "The Carousel component is deprecated. Please consider using the Gallery component".
gr.Variablegr.State(). gradio 3.50.2 said: "Variable was renamed to State".
gr.StatusTrackernothing; it was deprecated in 3.50.2 and removed.
gr.Webcamgr.Image(sources=["webcam"]) (4.0.0 renamed source to sources).
gr.Interpretationnothing; gradio 4.0.0 removed interpretation.
gr.interpretationnothing; gradio 4.0.0 removed interpretation.
gr.Parallelnothing in gradio; Parallel and Series (gradio.mix) were removed in 4.0.0.
gr.Seriesnothing in gradio; Parallel and Series (gradio.mix) were removed in 4.0.0.
gradio.components.IOComponentgradio.components.Component (custom components subclass it from 4.0.0).

gradio 5.0.0 (2024-10-09) removed make_waveform and HuggingFaceDatasetSaver (and LogoutButton) from the top level; 4.44.1 is the last release with them.

Which gradio release added the newer names?

"cannot import name" for a name that appears in current examples means the installed gradio is too old. The first release of each minor version that has the name:

NameFirst releaseDate (PyPI)
gr.ChatInterface3.37.02023-07-17
gr.LoginButton3.40.02023-08-10
gr.on3.45.02023-09-26
gr.http_server4.23.02024-03-25
gr.render4.31.02024-05-10
gr.ChatMessage4.38.02024-07-12
gr.load_chat5.10.02025-01-07
gr.Sidebar5.14.02025-01-30
gr.Navbar5.45.02025-09-10
gr.Server6.10.02026-03-24

What did each gradio release remove from gradio and gradio.components?

41 of the 246 names that from gradio import has ever accepted are gone from 6.32.0. 32 of the 213 modules that have existed are gone as well; paste No module named 'gradio...' into the lookup for any of them. Names that gradio.components only passed along from other packages (typing names, numpy, PIL and similar) are left out of this table but are in the lookup.

ReleaseDate (PyPI)ModuleNamesRemoved names
6.0.02025-11-21gradio1sketch
5.46.02025-09-16gradio2IS_WASM, wasm_utils
5.26.02025-04-23gradio1strings
5.0.02024-10-09gradio3HuggingFaceDatasetSaver, LogoutButton, make_waveform
5.0.02024-10-09gradio.components1LogoutButton
4.37.12024-06-25gradio1analytics_dashboard
4.0.02023-10-31gradio21Box, Carousel, HuggingFaceDatasetJSONSaver, ImagePaint, Interpretation, Parallel, Pil, Series, StatusTracker, TimeSeries, Timeseries, Variable, Webcam, cli_env_info, deploy_space, deprecation, inputs, interpretation, mix, outputs, reload
4.0.02023-10-31gradio.components9Carousel, Column, IOComponent, Interpretation, Row, StatusTracker, TimeSeries, Timeseries, Variable
3.45.02023-09-26gradio2current_pkg_version, pkgutil
3.35.02023-06-15gradio.components32AltairPlot, Block, BlockContext, Blurrable, BooleanSerializable, Changeable, Clearable, Clickable, Editable, EventListener, EventListenerMethod, FileData, FileSerializable, GallerySerializable, ImgSerializable, Inputable, JSONSerializable, ListStringSerializable, NeighborInterpretable, NumberSerializable, Playable, Releaseable, Selectable, Serializable, SimpleSerializable, Streamable, StringSerializable, Submittable, TokenInterpretable, Uploadable, VideoSerializable, _Image
3.26.02023-04-13gradio1media_data
3.25.02023-04-10gradio1documentation
3.24.02023-03-30gradio1serializing
3.21.02023-03-14gradio1encryptor
3.16.02023-01-05gradio3dataclasses, examples, queue
3.1.02022-07-19gradio3load_interface, pkg_resources, process_examples

How do I read the error?

How was this read, and how was it checked?

From the source of each release, with Python's ast module; no release was installed or imported. gradio's git tags (gradio@X.Y.Z) start at 3.41.0; for 3.0 to 3.40 the package files were read from the wheels on PyPI (only the needed parts of each wheel, by HTTP range requests). gradio imports eagerly, so a module's names are everything it binds at module level: classes, functions, assignments, imports, and what from .x import * brings in. Code under if TYPE_CHECKING: is skipped. Dates come from PyPI.

Checks, by a second reading of the same files: (1) each of the 236 top-level names read from the git tags is found as plain text in __init__.py (or the modules it star-imports) in every release of its range (26,624 name-and-release pairs with the wheel part), and is not imported there in the release on either side (128 edges). (2) A regular expression finds 29,937 definitions in 3,331 file versions; all are among the names read. (3) Against a different source, the wheels on PyPI, 22 release checks of the facts on this page agree:

NameReleaseWheel and data
gradio.inputs3.50.2has it
gradio.inputs4.0.0does not
gradio.outputs3.50.2has it
gradio.outputs4.0.0does not
gradio.Box3.50.2has it
gradio.Box4.0.0does not
gradio.Interpretation3.50.2has it
gradio.Interpretation4.0.0does not
gradio.components.IOComponent3.50.2has it
gradio.components.IOComponent4.0.0does not
gradio.make_waveform4.44.1has it
gradio.make_waveform5.0.0does not
gradio.HuggingFaceDatasetSaver4.44.1has it
gradio.HuggingFaceDatasetSaver5.0.0does not
gradio.ChatInterface3.37.0has it
gradio.ChatInterface3.36.1does not
gradio.http_server4.23.0has it
gradio.http_server4.22.0does not
gradio.ChatMessage4.38.0has it
gradio.ChatMessage4.37.2does not
gradio.Sidebar5.14.0has it
gradio.Sidebar5.13.2does not

Limits

Questions

How do I fix "cannot import name 'inputs' from 'gradio'" (or 'outputs')?

gradio 4.0.0 (2023-10-31) removed gradio.inputs and gradio.outputs; 3.50.2 is the last release with them. Replace gr.inputs.Textbox(...) with gr.Textbox(...), gr.outputs.Label(...) with gr.Label(...), and so on, as the 3.50.2 deprecation message said. To run the old code unchanged, pin pip install "gradio<4.0.0"; on a Hugging Face Space, set sdk_version in README.md.

How do I fix "cannot import name 'IOComponent' from 'gradio.components'"?

IOComponent was removed in gradio 4.0.0 (3.50.2 is the last release with it). Code that subclasses it, usually a custom component or an old extension, has to subclass gradio.components.Component instead, or pin gradio<4.0.0.

Why does "from gradio import ChatInterface" fail?

Your gradio is older than 3.37.0, the first release (of each minor version read) that has ChatInterface. Upgrade gradio. The same holds for ChatMessage (4.38.0), Sidebar (5.14.0) and the other names in the table of additions.

gradio fails with "cannot import name 'HfFolder' from 'huggingface_hub'". Is that gradio's fault?

It is the combination: gradio 4.9.0 to 5.7.x import HfFolder, which huggingface_hub 1.0.0 removed. Upgrade gradio to 5.8.0 or later, or pin huggingface_hub below 1.0.0. The huggingface_hub page on this site has the details.

Does this page cover gradio.components, gradio.utils and the other modules?

Yes: every module of gradio from 3.0.1 to 6.32.0, 6,066 module-and-name pairs in 213 modules.

Sources

The same data as JSON: gradio.json, licensed CC BY 4.0.

Related: "cannot import name 'HfFolder' from 'huggingface_hub'" (gradio 4.9.0 to 5.7.x) · "... from 'transformers'" · "... from 'diffusers'" · "... from 'datasets'".