Open
Description
Search before asking
- I have searched the Inference issues and found no similar bug report.
Bug
When trying to add both inference and a modern version of gradio (≥5.27.0) into the same project, pip
(via uv
) is unable to resolve the dependency graph due to incompatible pins on FastAPI and Typer:
-
inference (all released versions) pins:
typer==0.9.0
fastapi>=0.100,<0.111
-
gradio≥5.27.0 pins:
fastapi>=0.115.2
typer>=0.12
Because there is no overlap in acceptable versions of FastAPI or Typer, it’s currently impossible to install both in the same environment. The version 5.27.0 of gradio added the neat feature ImageSlider
to compare differences between images. The latest version of gradio is 5.35.0.
Environment
- Python: 3.9 (resolution also failed for higher Python versions e.g. 3.10–3.13)
- inference: any version (0.9.18 → 0.51.1)
- gradio: ≥5.27.0
Minimal Reproducible Example
uv init --bare --python 3.9
uv add inference "gradio>=5.27.0" --prerelease=allow
You'll see an error similar to:
... Because inference>=0.9.18 depends on typer==0.9.0, and gradio>=5.27.0 depends on typer>=0.12:
inference>=0.9.18 and typer>=0.12 are incompatible.
... Because inference>=0.10.0 depends on fastapi<0.111, and gradio>=5.27.0 depends on fastapi>=0.115.2:
inference>=0.10.0 and fastapi>=0.115.2 are incompatible.
...
Your project's requirements are unsatisfiable.
Additional
Thank you for your work on inference. I'm looking forward to a resolution so we can build neat Gradio demos on Hugging Face! 😄
Are you willing to submit a PR?
- Yes I'd like to help by submitting a PR!