I have uploaded file but its showing error
→ ERROR: process “/bin/sh -c pip install --no-cache-dir -r /tmp/requirements.txt” did not complete successfully: exit code: 1
How to resolve this error
I have uploaded file but its showing error
→ ERROR: process “/bin/sh -c pip install --no-cache-dir -r /tmp/requirements.txt” did not complete successfully: exit code: 1
How to resolve this error
If I diagnose just by log:
Those lines are Docker/BuildKit progress output saying the builder didn’t reuse cached layers (so it re-ran the steps). Your Space can still succeed with “cache miss” lines. Your page shows the same pattern. (Hugging Face)
SSE = Server-Sent Events (the streaming mechanism Spaces uses to fetch logs). When SSE is “not enabled” (or otherwise unavailable), you often see only the outer build scaffolding, not the actual pip/OS error line. This shows up in unrelated Spaces issues, so it’s commonly a logging/infra limitation, not the root cause. (Hugging Face)
In a Gradio Space, Hugging Face’s build uses a base image and runs steps like:
pip install … gradio[oauth,mcp]==6.5.1 … spaces) (Hugging Face)COPY … /app) (Hugging Face)requirements.txt (pip install -r requirements.txt) (Hugging Face)If step (3) tries to change core runtime packages (especially gradio), pip can fail or produce a broken environment.
Your repo config currently sets Gradio 6.5.1 via the Space YAML:
sdk: gradiosdk_version: 6.5.1 (Hugging Face)But your requirements.txt pins Gradio 4.44.0:
gradio==4.44.0 (Hugging Face)That is a direct mismatch. In Gradio Spaces, Hugging Face explicitly documents that the Gradio version should be controlled via sdk_version. (Hugging Face)
And there are forum threads describing how pinning Gradio (or related core deps) in requirements.txt can be overridden or can cause conflicts during rebuilds. (Hugging Face Forums)
Common outcomes:
Because your Space can’t stream the real logs (SSE error), you don’t see the exact pip line—but the mismatch above is the most concrete, repo-specific explanation.
requirements.txtrequirements.txt to remove the gradio==4.44.0 line, leaving only your app deps (pandas/numpy/scikit-learn).sdk_version: 6.5.1 in README.md.Why this is the clean path:
sdk_version. (Hugging Face)requirements.txt for your packages. (Hugging Face)Set sdk_version: 4.44.0 in README.md so both YAML and requirements.txt agree. Gradio Spaces are designed for this knob. (Hugging Face)
Use “Factory reboot this space” in the Space Settings. This is specifically recommended to rebuild “without using cached requirements.” (Hugging Face Forums)
If you want deterministic installs (and to avoid managed Gradio install layers), use Docker Spaces (sdk: docker) and manage everything in a Dockerfile. (Hugging Face)
Even without server logs, you can validate the most likely failure locally:
python -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install gradio==6.5.1
pip install -r requirements.txt
If pip errors, you’ll see the exact conflict immediately. (If it succeeds locally, then the next suspect is platform-side/build infra.)
Also: if “SSE is not enabled” persists across restarts/factory reboot, it can be an infra-side issue (multiple users report it independently of their code). (Hugging Face Forums)
Your app.py contains invalid Python format specifiers like :.1 f and :.2 f (note the space). That will raise a runtime exception when those strings are formatted. Example lines show ({y.mean()*100:.1 f}%) and {accuracy*100:.2 f}%. (Hugging Face)
Fix: remove the spaces → :.1f, :.2f, :,.2f.
gradio==4.44.0 from requirements.txt. (Hugging Face)sdk_version: 6.5.1 in README. (Hugging Face):.1 f → :.1f etc. in app.py to avoid the next runtime crash. (Hugging Face)