# Unable to install llama cpp python library in App Lab

**URL:** <https://forum.arduino.cc/t/unable-to-install-llama-cpp-python-library-in-app-lab/1439415>\
**Category:** App Lab\
**Created:** [April 11, 2026, 2:27pm UTC](https://forum.arduino.cc/t/unable-to-install-llama-cpp-python-library-in-app-lab/1439415 "2026-04-11T14:27:23Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![n1lzer0](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/n1lzer0/32/1261706_2.png) [@n1lzer0](https://forum.arduino.cc/u/n1lzer0)\
**Post date:** [April 11, 2026, 2:27pm UTC](https://forum.arduino.cc/t/unable-to-install-llama-cpp-python-library-in-app-lab/1439415/1 "2026-04-11T14:27:23Z")

</div>

Hello,

I have been trying to install Llama CPP Python library on Arduino Uno Q for running smaller llms. I tried installing via Requirements.txt in arduino app lab but it gave the following error.

> Using CPython 3.13.9 interpreter at: /usr/local/bin/python  
> Creating virtual environment at: .cache/.venv  
> Activating python virtual environment  
> Using Python 3.13.9 environment at: .cache/.venv  
> Resolved 6 packages in 11.95s  
> Building llama-cpp-python==0.3.20  
> Downloading numpy (14.9MiB)  
> Downloading numpy  
> × Failed to build `llama-cpp-python==0.3.20`  
> ├─▶ The build backend returned an error  
> ╰─▶ Call to `scikit_build_core.build.build_wheel` failed (exit status: 1)  
> [stdout]  
> \*\*\* scikit-build-core 0.12.2 using CMake 4.3.1 (wheel)  
> \*\*\* Configuring CMake...  
> loading initial cache file /tmp/tmpy6\_yu2lo/build/CMakeInit.txt  
> -- Configuring incomplete, errors occurred!  
> [stderr]  
> CMake Error at  
> /app/.cache/uv/builds-v0/.tmp1BZIbL/lib/python3.13/site-packages/cmake/data/share/cmake-4.3/Modules/CMakeDetermineCCompiler.cmake:48  
> (message):  
> Could not find the compiler specified in the environment variable CC:  
> gcc.  
> Call Stack (most recent call first):  
> CMakeLists.txt:3 (project)  
> CMake Error: CMAKE\_C\_COMPILER not set, after EnableLanguage  
> CMake Error: CMAKE\_CXX\_COMPILER not set, after EnableLanguage  
> \*\*\* CMake configuration failed  
> hint: This usually indicates a problem with the package or the build  
> environment.  
> Clearing cache at: .cache/uv  
> Removed 8015 files (283.9MiB)

Please help me solve this error and how i can fix this. Also, is there any other ways i can run llms (mostly under 1B parameters ) in arduino uno q (4gb ram varient)?.

Thanks.

---

<div class="post-metadata">

**Author:** ![AndreaRichetta](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/andrearichetta/32/219936_2.png) [@AndreaRichetta](https://forum.arduino.cc/u/AndreaRichetta)\
**Post date:** [April 13, 2026, 4:24pm UTC](https://forum.arduino.cc/t/unable-to-install-llama-cpp-python-library-in-app-lab/1439415/2 "2026-04-13T16:24:05Z")

</div>

Ciao @n1lzer0

take a look ath this project on project hub :)

> **[Local LLM AI ChatBot on Arduino UNO Q](https://projecthub.arduino.cc/robuinlabs/local-llm-ai-chatbot-on-arduino-uno-q-043aa9)**
>
> Build Your Own Private AI Assistant Without Internet 
> An local LLM AI chatbot which can also run when offline that was built by installing a small LLM on Arduino UNO Q.

---

<div class="post-metadata">

**Author:** ![n1lzer0](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/n1lzer0/32/1261706_2.png) [@n1lzer0](https://forum.arduino.cc/u/n1lzer0)\
**Post date:** [April 13, 2026, 4:34pm UTC](https://forum.arduino.cc/t/unable-to-install-llama-cpp-python-library-in-app-lab/1439415/3 "2026-04-13T16:34:21Z")

</div>

Thanks for the help.

But i wanted to use llama cpp as a python package inside app lab and in this project, it has been used outside the app lab ie in the board's terminal.

---

<div class="post-metadata">

**Author:** ![n1lzer0](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/n1lzer0/32/1261706_2.png) [@n1lzer0](https://forum.arduino.cc/u/n1lzer0)\
**Post date:** [April 13, 2026, 4:37pm UTC](https://forum.arduino.cc/t/unable-to-install-llama-cpp-python-library-in-app-lab/1439415/4 "2026-04-13T16:37:04Z")

</div>

Update:  
I further checked into the error and it apparently requires some c++ tools to build the package which was included in build-essential package.

So i ran this command in boards' shell

```arduino
sudo apt install build-essential 

```

Unfortunately upon installing the said package. it still gave the same error.

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [April 13, 2026, 7:28pm UTC](https://forum.arduino.cc/t/unable-to-install-llama-cpp-python-library-in-app-lab/1439415/5 "2026-04-13T19:28:58Z")

</div>

> [@n1lzer0](#):
>
> So i ran this command in boards' shell
> 
> ```plaintext
> sudo apt install build-essential 
> 
> ```
> 
> Unfortunately upon installing the said package. it still gave the same error.

The Python script of the App runs in a [**Docker** container](https://docs.docker.com/reference/glossary/#container:~:text=%23-,container,container,-A%20container%20is). This is an isolated environment. So changes you make in the primary operating system's environment have no effect on the environment in which the Python script is executed, and vice versa.

---

<div class="post-metadata">

**Author:** ![n1lzer0](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/n1lzer0/32/1261706_2.png) [@n1lzer0](https://forum.arduino.cc/u/n1lzer0)\
**Post date:** [April 14, 2026, 1:45am UTC](https://forum.arduino.cc/t/unable-to-install-llama-cpp-python-library-in-app-lab/1439415/6 "2026-04-14T01:45:02Z")

</div>

Is there any way i can install this in the docker container?

---

<div class="post-metadata">

**Author:** ![spacesailor123643](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/spacesailor123643/32/1276629_2.png) [@spacesailor123643](https://forum.arduino.cc/u/spacesailor123643)\
**Post date:** [April 14, 2026, 1:49am UTC](https://forum.arduino.cc/t/unable-to-install-llama-cpp-python-library-in-app-lab/1439415/7 "2026-04-14T01:49:51Z")

</div>

ooo idk bout this topic... TIME TO LEARN

Will you tell me what's ur issue?

---

<div class="post-metadata">

**Author:** ![n1lzer0](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/n1lzer0/32/1261706_2.png) [@n1lzer0](https://forum.arduino.cc/u/n1lzer0)\
**Post date:** [April 16, 2026, 6:49am UTC](https://forum.arduino.cc/t/unable-to-install-llama-cpp-python-library-in-app-lab/1439415/8 "2026-04-16T06:49:54Z")

</div>

The issue is, i was trying to install llama cpp python library, which requries some c++ based packages. However, these packages are required to be installed in the docker container, which is not possible for now i think. I would try to build the package as a server outside the docker enviroment as suggested by @AndreaRichetta and then access it from applab by connecting to it.

Will further update this if it works.

---

<div class="post-metadata">

**Author:** ![customcontroller](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/customcontroller/32/1013044_2.png) [@customcontroller](https://forum.arduino.cc/u/customcontroller)\
**Post date:** [April 17, 2026, 11:22pm UTC](https://forum.arduino.cc/t/unable-to-install-llama-cpp-python-library-in-app-lab/1439415/9 "2026-04-17T23:22:22Z")

</div>

> [@n1lzer0](#):
>
> Also, is there any other ways i can run llms (mostly under 1B parameters ) in arduino uno q (4gb ram varient)?.

The following is a one line command to download and install ollama. The default installation script fails because the tar archive includes large files for NVIDIA CUDA cores. Since Uno Q does not have CUDA cores, the CUDA libraries are excluded. The tar archive contains compiled ARM64 code so no compiling hassles.

`curl -fsSL https://ollama.com/download/ollama-linux-arm64.tar.zst | sudo tar x --zstd --exclude="lib/ollama/cuda_v1[23]" -C /usr/local/`

After this finishes, the following new files should exist.

```arduino
/usr/local/bin/ollama # executable
/usr/local/lib/ollama/ # libraries
/usr/local/lib/ollama/libggml-base.so -> libggml-base.so.0
/usr/local/lib/ollama/libggml-base.so.0 -> libggml-base.so.0.0.0
/usr/local/lib/ollama/libggml-base.so.0.0.0
/usr/local/lib/ollama/libggml-cpu.so

```

Use ollama like this to run the smollm:360m model. The model is stored in the hidden directory ~/.ollama so it is much faster to start after the first use. ollama has an HTTP REST API so it should be accessible from an app lab app. The python lib is named ollama.

```arduino
ollama serve
ollama run smollm:360m

```

---

<div class="post-metadata">

**Author:** ![n1lzer0](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/n1lzer0/32/1261706_2.png) [@n1lzer0](https://forum.arduino.cc/u/n1lzer0)\
**Post date:** [April 18, 2026, 2:21pm UTC](https://forum.arduino.cc/t/unable-to-install-llama-cpp-python-library-in-app-lab/1439415/10 "2026-04-18T14:21:40Z")

</div>

Thanks for the help.

I installed ollama this way and it worked. Tried running LFM2.5-1.2B-instruct and it worked great :D . However, to access it through python code, It needs to be "exposed" i.e we should be able to access it by the port (the default port is 11434). For this,  
we need to edit the service file via

```arduino
systemctl edit ollama.service

```

Unfortunately, It showed the following error.

```arduino
arduino@Baymax:~$ sudo systemctl edit ollama.service
No files found for ollama.service.
Run 'systemctl edit --force --full ollama.service' to create a new unit.

```

I dont know how to create and edit a service file and what i have to add, for it to run. (I tried it once in windows for another program but i dont know how to do so in linux).

---

<div class="post-metadata">

**Author:** ![customcontroller](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/customcontroller/32/1013044_2.png) [@customcontroller](https://forum.arduino.cc/u/customcontroller)\
**Post date:** [April 18, 2026, 7:46pm UTC](https://forum.arduino.cc/t/unable-to-install-llama-cpp-python-library-in-app-lab/1439415/11 "2026-04-18T19:46:09Z")

</div>

I found the ollama install.sh creates all the systemd stuff so "ollama serve" runs as a service. This is essential so version 2 of the one line command follows. This runs the ollama Linux installation script which is modified on the fly to exclude the CUDA files.

`curl -fsSL https://ollama.com/install.sh | sed 's/\(tar.*xf - \)/\1--exclude=\"lib\/ollama\/cuda_v1[23]\" /' | sh`

The ollama service now runs as user ollama so models are stored in /usr/share/ollama/.ollama. This is in the rather small root partition so be careful not to fill up the root partition.

This is the state of my root partition with the smollm:360m model installed.

```arduino
arduino@UnoKyu:/usr/share$ df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/mmcblk0p68 9.8G 8.0G 1.3G 87% /

```

Perhaps symbolic links can redirect model storage to the /home/arduino partition, if needed. I removed the .ollama/models directory in /home/arduino since it is no longer used.

---

<div class="post-metadata">

**Author:** ![n1lzer0](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/n1lzer0/32/1261706_2.png) [@n1lzer0](https://forum.arduino.cc/u/n1lzer0)\
**Post date:** [June 1, 2026, 12:07am UTC](https://forum.arduino.cc/t/unable-to-install-llama-cpp-python-library-in-app-lab/1439415/12 "2026-06-01T00:07:34Z")

</div>

With the addition of custom bricks (the docker one) , is it possible now to somehow add the required packages using it?

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [June 2, 2026, 12:15am UTC](https://forum.arduino.cc/t/unable-to-install-llama-cpp-python-library-in-app-lab/1439415/13 "2026-06-02T00:15:54Z")

</div>

Hi @n1lzer0. You are definitely on the right track!

The [custom Bricks feature](https://blog.arduino.cc/2026/04/29/arduino-app-lab-0-7-custom-bricks-are-here/) does not allow you to customize the contents of the primary [**Docker** container](https://docs.docker.com/reference/glossary/#container:~:text=%23-,container,container,-A%20container%20is) in which the App's Python script runs. However, it does allow you to run additional custom containers, which the Python script can interface with. This is actually how some of the official Bricks provided by Arduino work already.

Unfortunately we haven't published documentation for the custom Bricks feature yet, but the documentation team have already produced a draft of the documentation, which you can access here in the documentation source repository:

[https://github.com/arduino/docs-content/blob/app-lab-custom-bricks-documentation/content/software/app-lab/5.bricks/3.custom-bricks/custom-bricks.md](https://github.com/arduino/docs-content/blob/app-lab-custom-bricks-documentation/content/software/app-lab/5.bricks/3.custom-bricks/custom-bricks.md)

Note that the `brick_compose.yaml` file in the custom Brick is a Docker compose file, so the documentation provided by Docker will also be applicable:

> **[Compose file reference](https://docs.docker.com/reference/compose-file/)**
>
> Find the latest recommended version of the Docker Compose file format for defining multi-container applications.

You might be able to find an existing Docker [image](https://docs.docker.com/reference/glossary/#image:~:text=%23image-,image,-An%20image%20is) published on an [image registry](https://docs.docker.com/reference/glossary/#registry:~:text=%23-,registry,registry,-A%20registry%20is) (e.g., [**Docker Hub**](https://hub.docker.com/) that provides all the capabilities you require. Alternatively, you can create your own custom image. If you create a custom image, you should note that (at least currently), you must manage this manually. Since **Arduino App Lab** takes care of managing the App's containers for the user, you might expect that it would handle building the container from the image source automagically, but unfortunately this is not supported. The "gotcha" is that it will actually build the container the first time you start an App with a custom Brick that references a local image source. However, afterwards you will run into a confusing situation where changes you make to the image source don't have any effect on the behavior of the Brick, due to the fact that **Arduino App Lab** / **Arduino App CLI** doesn't rebuild the container as needed ([`arduino/arduino-app-cli#389`](https://github.com/arduino/arduino-app-cli/issues/389)) and will instead simply continue to use the container it built from the previous version of the image source on the first run.

I'm happy to provide some assistance with managing containers built from a custom image source if you end up going that route.

Here are some examples of custom Bricks that use a dedicated container:

> [@UNO-Q-AudioPlayer-Brick](https://forum.arduino.cc/t/uno-q-audioplayer-brick/1443084):
>
> I just published a new UNO Q App Lab experiment: musical_note UNO-Q-AudioPlayer-Brick The project explores a generic audio playback brick architecture for Arduino App Lab on UNO Q. Main features: custom App Lab brick containerized Linux audio backend ALSA audio playback MP3 streaming volume control playback status reusable Python API The current version focuses on HTTP/HTTPS audio streams: from audioplayer import AudioPlayer player = AudioPlayer() player.set\_volume(50) player.play("h…

> **[demo-local-bricks-app/bricks/with\_container at main ·...](https://github.com/dido18/demo-local-bricks-app/tree/main/bricks/with_container)**
>
> main/bricks/with\_container

> [@Getting a Neato XV-11 Lidar Working on the Q](https://forum.arduino.cc/t/getting-a-neato-xv-11-lidar-working-on-the-q/1445568/17):
>
> Here is an App that demonstrates how such a thing can be done using the [**Flask**](https://flask.palletsprojects.com/en/stable/) web application framework:
> 
> [custom-brick-with-container.zip](https://forum.arduino.cc/uploads/short-url/hQfGUaS2S5nMR6z4XyfLyMl4itg.zip) (3.9 KB)

> [@SPI3 App Lab Brick Proof of Concept for UNO Q](https://forum.arduino.cc/t/spi3-app-lab-brick-proof-of-concept-for-uno-q/1446665):
>
> Following the SPI3 discussions, I spent some time experimenting with SPI3 communication between the STM32U585 MCU and the QRB2210 MPU on the UNO Q. The result is a small Proof of Concept demonstrating: A custom Arduino App Lab brick Access to /dev/spidev0.0 from a dedicated Docker container SPI3 communication between MCU and MPU Transmission of floating-point values A simple Python API usable from App Lab Repository: This is an experimental project and certainly not production-ready, but …

> [@Getting a Neato XV-11 Lidar Working on the Q](https://forum.arduino.cc/t/getting-a-neato-xv-11-lidar-working-on-the-q/1445568/22):
>
> Here is a simple demonstration App I built starting from your code:
> 
> [spibridge.zip](https://forum.arduino.cc/uploads/short-url/kSgCChKN8AtusIl18XaNCvCVGyT.zip) (7.7 KB)

You may find some relevant information in the discussion on this forum topic:

> [@Getting a Neato XV-11 Lidar Working on the Q](https://forum.arduino.cc/t/getting-a-neato-xv-11-lidar-working-on-the-q/1445568):
>
> In several threads I posted about issues with [Bridge Latency](https://forum.arduino.cc/t/evaluated-uno-q-router-bridge-latency-with-max31855/1423998), [Serial1 vs using @KurtE's Serial3](https://forum.arduino.cc/t/uno-q-reading-data-from-serial1-gets-corrupted/1443776/45), and [@KurtE's PWM "analogWriteFrequency"](https://forum.arduino.cc/t/arduino-uno-q-very-poor-pwm/1445321/7). This post brings that all together to show the results. So in summary, I use Serial3 to collect data from the lidar and changed the PWM frequency to 4 khz which is more in line with what the original design was using. With those changes was able to get stable lidar readings to interface with streamlit to display the lidar readings:

---

<div class="post-metadata">

**Author:** ![n1lzer0](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/n1lzer0/32/1261706_2.png) [@n1lzer0](https://forum.arduino.cc/u/n1lzer0)\
**Post date:** [June 21, 2026, 3:54am UTC](https://forum.arduino.cc/t/unable-to-install-llama-cpp-python-library-in-app-lab/1439415/14 "2026-06-21T03:54:28Z")

</div>

I have noticed a LLM Brick in About Bricks in AppLab documentation(Perhaps to be used in Ventuno Q).

> **[app-bricks-py/src/arduino/app\_bricks/llm at main · arduino/app-bricks-py](https://github.com/arduino/app-bricks-py/tree/main/src/arduino/app_bricks/llm)**
>
> main/src/arduino/app\_bricks/llm

Can it be used in Uno Q to run lower LLMs?

---

<div class="post-metadata">

**Author:** ![customcontroller](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/customcontroller/32/1013044_2.png) [@customcontroller](https://forum.arduino.cc/u/customcontroller)\
**Post date:** [June 21, 2026, 7:21am UTC](https://forum.arduino.cc/t/unable-to-install-llama-cpp-python-library-in-app-lab/1439415/15 "2026-06-21T07:21:20Z")

</div>

@n1lzer0 ollama works on uno q with a little extra work. Much easier than llama.cpp to get working. Or are you only interested in llama.cpp? Also I am talking about running ollama server outside of app lab/docker. It is possible to run ollama server outside docker then inside docker main.py can use the python ollama client library to access the ollama server via HTTP API.

---

<div class="post-metadata">

**Author:** ![customcontroller](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/customcontroller/32/1013044_2.png) [@customcontroller](https://forum.arduino.cc/u/customcontroller)\
**Post date:** [June 21, 2026, 8:50am UTC](https://forum.arduino.cc/t/unable-to-install-llama-cpp-python-library-in-app-lab/1439415/16 "2026-06-21T08:50:53Z")

</div>

If you have ollama correctly installed on Uno Q outside docker/app lab/brick, it defaults to only accepting connection from localhost. If you want to access ollama server on Uno Q from another computer you can change the default like this

```bash
sudo systemctl edit ollama.service

```

Then add the following.

```ini
[Service]
Environment="OLLAMA_HOST=0.0.0.0"

```

Save the change then do the following to activate the change.

```bash
sudo systemctl daemon-reload
sudo systemctl restart ollama

```

You can get the same or better answer by asking gemini or chatgpt.

```arduino
how to expose ollama server to the non localhost computers on Linux?

```

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [July 5, 2026, 3:33pm UTC](https://forum.arduino.cc/t/unable-to-install-llama-cpp-python-library-in-app-lab/1439415/17 "2026-07-05T15:33:26Z")

</div>

> [@ptillisch](#):
>
> Unfortunately we haven't published documentation for the custom Bricks feature yet

I have an update on this subject. The documentation has now been completed and published:

[https://docs.arduino.cc/software/app-lab/bricks/custom-bricks/](https://docs.arduino.cc/software/app-lab/bricks/custom-bricks/)
