# Broken Space After Debian13 Update And llama-cpp-python Update

**URL:** <https://discuss.huggingface.co/t/broken-space-after-debian13-update-and-llama-cpp-python-update/167908>\
**Category:** Spaces\
**Created:** [August 29, 2025, 5:28pm UTC](https://discuss.huggingface.co/t/broken-space-after-debian13-update-and-llama-cpp-python-update/167908 "2025-08-29T17:28:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MisterAI](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/misterai/32/64444_2.png) [@MisterAI](https://discuss.huggingface.co/u/MisterAI)\
**Post date:** [August 29, 2025, 5:28pm UTC](https://discuss.huggingface.co/t/broken-space-after-debian13-update-and-llama-cpp-python-update/167908/1 "2025-08-29T17:28:00Z")

</div>

Hi,

Some of my Gradio spaces that were working previously are no longer functioning. The first issue seems to be related to the Debian 13 update: my Gradio spaces were likely initially deployed with Debian 12.

After trying the workaround suggested by **john6666** , one of my older spaces restarted, but it now gets stuck with a different Python error.

> [@\[ERROR\] Get error when deploy space](https://discuss.huggingface.co/t/error-get-error-when-deploy-space/166612/28):
>
> I confirmed [it’s resolved](https://huggingface.co/spaces/John6666/testtestsetset). If anyone is unsure of how to resolve it, I recommend adding an extra line break at the end of requirements.txt and save it.

For another space deployed with Docker, I modified the Dockerfile to specify the Debian and Python versions:

```dockerfile
FROM python:3.11-slim-bookworm
# Instead of: FROM python:3.11-slim

```

This change was intended to use Python 3.11 with Debian 12 (Bookworm), as the default `python:3.11-slim` now uses Debian 13 (Trixie).  
However, it initially returned an error:

```auto
E: Package 'libgl1-mesa-glx' has no installation candidate

```

After fixing the package error, the space no longer shows that issue, but it gets stuck during the build stage after:

```auto
Building wheel for llama-cpp-python (pyproject.toml): started

```

It get in TimeOut.

The same issue occurs in a third space that was working today until I changed its name (which triggered a rebuild). Now, it also gets stuck at the same build stage.

For my older spaces deployed automatically with Gradio, it would be ideal if, during a rebuild, the versions of the OS, Python, Gradio, and other essential dependencies remained the same as those used during the initial deployment. This would help avoid failures during restarts or rebuilds.

**Note:** I know that versions can be specified in `requirements.txt` (though not the base OS container).

* * *

### My Questions:

1. For my Hugging Face Spaces that were automatically deployed for Gradio, is there a way to find out the versions of the OS, Python, and the main packages/dependencies used? This would allow me to specify or lock those versions by simply editing the `requirements.txt` file.

2. Is there a solution to stay on, for example, Debian 12 with Python 3.10 during a rebuild for spaces deployed without a Dockerfile?

3. Regarding the current error:

Thank you for your feedback!

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [August 30, 2025, 1:04am UTC](https://discuss.huggingface.co/t/broken-space-after-debian13-update-and-llama-cpp-python-update/167908/2 "2025-08-30T01:04:49Z")

</div>

> 1 / 2

You can specify [Python versions](https://huggingface.co/docs/hub/spaces-config-reference) and the [_additional_ packages to install](https://huggingface.co/docs/hub/spaces-dependencies). However, everything else must be done manually… Also, the OS is fixed in Gradio spaces.

```py
import sys, platform
from importlib import metadata as md

print("Python:", platform.python_version(), sys.implementation.name)
print("OS:", platform.uname())
print("\n".join(sorted(f"{d.metadata['Name']}=={d.version}" for d in md.distributions())))

```

> 3

[Installing the latest CPU build of `llama_cpp_python` in HF Spaces doesn’t work properly with `requirements.txt`](https://discuss.huggingface.co/t/latest-llama-cpp-wont-build-in-spaces/166357) for now…

---

<div class="post-metadata">

**Author:** ![MisterAI](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/misterai/32/64444_2.png) [@MisterAI](https://discuss.huggingface.co/u/MisterAI)\
**Post date:** [August 30, 2025, 1:14pm UTC](https://discuss.huggingface.co/t/broken-space-after-debian13-update-and-llama-cpp-python-update/167908/3 "2025-08-30T13:14:48Z")

</div>

hello,

Thank you for your answer and solutions @John6666  
Already 2 HFSpaces up again.\*

\*\*For Memory : workaround

- **in requirements.txt**

`#Comment the line for llama.cpp `  
`#llama-cpp-python>=0.2.0`

- **in app.py for DockerSpace**

```auto

import subprocess
import sys, platform
from importlib import metadata as md

#Install wheel From URL (here for Python3.11 check for other python version if needed)
subprocess.run("pip install https://github.com/abetlen/llama-cpp-python/releases/download/v0.3.1/llama_cpp_python-0.3.1-cp311-cp311-linux_x86_64.whl", shell=True)

#Add Log to show all versions
print("Python:", platform.python_version(), sys.implementation.name)
print("OS:", platform.uname())
print("\n".join(sorted(f"{d.metadata['Name']}=={d.version}" for d in md.distributions())))

```

- **in app.py for GRadioSpace**

```auto

import subprocess
import sys, platform
from importlib import metadata as md

#Install and Compile wheel at cost of 5minutes
subprocess.run("pip install -V llama_cpp_python==0.3.15", shell=True)

#Add Log to show all versions 
print("Python:", platform.python_version(), sys.implementation.name)
print("OS:", platform.uname())
print("\n".join(sorted(f"{d.metadata['Name']}=={d.version}" for d in md.distributions())))

```

thank you.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](https://discuss.huggingface.co/u/system)\
**Post date:** [August 31, 2025, 1:15am UTC](https://discuss.huggingface.co/t/broken-space-after-debian13-update-and-llama-cpp-python-update/167908/4 "2025-08-31T01:15:23Z")

</div>

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
