I have the requirements (CPU Upgrade instance):
cmake==4.0.3
llama_cpp_python==0.3.15
gradio==5.34.2
pypdf==5.9.0
python-docx==1.2.0
pandas==2.3.0
When this space builds: 3B Param Basic Chatbot - a Hugging Face Space by david-thrower , the space will get βstuckβ building the wheel for llama.cpp without any feedback in the logs on what is going on:
Building wheels for collected packages: llama_cpp_python
Building wheel for llama_cpp_python (pyproject.toml): started
# ... never prints another line then a "build error" with no further info
I have tried numerous attempts to troubleshoot this:
- Adding
cmake==4.0.3 to the requirements.
- Setting the environment variables: FORCE_CMAKE=1; CMAKE_ARGS=β-DLLAMA_OPENBLAS=onβ'; PIP_NO_CACHE_DIR=1
- Nothing seems to fix the problem
The is working like a charm on my laptop (albeit building that wheel did take a few minutes).
1 Like
I tried it as a last resort, and it worked.
app.py
import subprocess
subprocess.run("pip install -V llama_cpp_python==0.3.15", shell=True)
...
requirements.txt
#cmake==4.0.3
#llama_cpp_python==0.3.15
#gradio==5.34.2
pypdf==5.9.0
python-docx==1.2.0
pandas==2.3.0
I donβt know, how it is working for you but I am also facing this issue.
logs:
Collecting llama_cpp_python==0.3.15
Downloading llama_cpp_python-0.3.15.tar.gz (50.6 MB)
ββββββββββββββββββββββββββββββββββββββββ 50.6/50.6 MB 68.6 MB/s 0:00:00
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: typing-extensions>=4.5.0 in /usr/local/lib/python3.13/site-packages (from llama_cpp_python==0.3.15) (4.15.0)
Requirement already satisfied: numpy>=1.20.0 in /usr/local/lib/python3.13/site-packages (from llama_cpp_python==0.3.15) (2.4.1)
Collecting diskcache>=5.6.1 (from llama_cpp_python==0.3.15)
Downloading diskcache-5.6.3-py3-none-any.whl.metadata (20 kB)
Requirement already satisfied: jinja2>=2.11.3 in /usr/local/lib/python3.13/site-packages (from llama_cpp_python==0.3.15) (3.1.6)
Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.13/site-packages (from jinja2>=2.11.3->llama_cpp_python==0.3.15) (3.0.3)
Downloading diskcache-5.6.3-py3-none-any.whl (45 kB)
Building wheels for collected packages: llama_cpp_python
Building wheel for llama_cpp_python (pyproject.toml): started
Building wheel for llama_cpp_python (pyproject.toml): still running...
# No progress after this
app.py
import subprocess
subprocess.run("pip install -V llama_cpp_python==0.3.15", shell=True)
print("Hello")
1 Like