Certainly! Here’s a detailed message to explain the dependency issue you’re facing, with the necessary commands to help resolve it. Hopefully, this will make it clear to others in the community what you’ve tried and where the issue lies.
Help Request: Dependency Conflict Between Gradio and Huggingface Hub Versions
Hi everyone,
I’ve been struggling with a dependency issue for an entire day and am hoping someone here can help. My application requires specific versions of libraries, especially huggingface-hub==0.23.5
and gradio==4.44.0
, but a later step in my setup process unintentionally upgrades huggingface-hub
, causing conflicts. Here’s a breakdown of what I’ve tried and where the problem occurs:
Setup and Context
-
Installing dependencies:
First, I install all my dependencies from arequirements.txt
file:pip install -r requirements.txt
In this file, I specify:
huggingface-hub==0.23.5 gradio==4.44.0
-
Final setup step:
After installing dependencies, I run the following:RUN pip install --no-cache-dir gradio[oauth]==5.5.0 "uvicorn>=0.14.0" spaces
This command unexpectedly upgrades
huggingface-hub
to version0.26.2
, which is incompatible with somellama-index
packages I’m using:llama-index-llms-huggingface
requireshuggingface-hub<0.24.0
llama-index-llms-huggingface-api
also requireshuggingface-hub<0.24.0
Problem
The version bump of huggingface-hub
to 0.26.2
breaks compatibility with these llama-index
packages, causing my application to fail.
Attempted Solutions and Issue Recurrence
I tried downgrading huggingface-hub
back to 0.23.5
after the initial install, but each time I execute the final setup step (above), the newer version 0.26.2
of huggingface-hub
is reinstalled due to gradio==5.5.0
dependencies.
Request for Help
I would greatly appreciate any guidance on:
- How to force
pip
to retainhuggingface-hub==0.23.5
while still satisfyinggradio
requirements, OR - Any alternative approach that ensures stable compatibility across these packages without further dependency conflicts.
Thank you for any insights—this has been a full day of troubleshooting without resolution, and I’m feeling stuck.