Can't install mopidy-local with Mopidy 4.0 on RaspberryPi

Fresh install of latest Raspberry OS with disk imager. Did apt update/upgrade. Connected USB disk and USB Audio device.

Installed Mopidy 4.0.2 based on Debian instructions.

Tried to install mopidy-local and get an error:

Installing collected packages: typing-extensions, h11, docstring-parser, annotated-types, typing-inspection, pydantic-core, httpcore, anyio, rich-rst, pydantic, httpx, cyclopts, mopidy, mopidy-local

Attempting uninstall: typing-extensions

Found existing installation: typing_extensions 4.13.2

error: uninstall-no-record-file

Γ— Cannot uninstall typing_extensions 4.13.2

╰─> The package’s contents are unknown: no RECORD file was found for typing_extensions.

hint: The package was installed by debian. You should check if it can uninstall the package.

I tried to run the command with `--ignore-installed but that resulted in a different error:

Installing build dependencies … error

error: subprocess-exited-with-error

Γ— pip subprocess to install build dependencies did not run successfully.

β”‚ exit code: 1

╰─> [76 lines of output]

  Looking in indexes: https://pypi.org/simple , https://www.piwheels.org/simple , https://www.piwheels.org/simple

  Collecting meson-python>=0.12.1

    Using cached https://www.piwheels.org/simple/meson-python/meson_python-0.20.0-py3-none-any.whl.metadata (2.1 kB)

  Collecting pycairo>=1.16

    Using cached pycairo-1.29.1.tar.gz (666 kB)

    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 'error'

    error: subprocess-exited-with-error



    Γ— Preparing metadata (pyproject.toml) did not run successfully.

    β”‚ exit code: 1

    ╰─> \[48 lines of output\]

        + meson setup /tmp/pip-install-siq0iev2/pycairo_567e7299d4f54403a99176ca7b282da6 /tmp/pip-install-siq0iev2/pycairo_567e7299d4f54403a99176ca7b282da6/.mesonpy-imon8tt4 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md -Dwheel=true -Dtests=false --native-file=/tmp/pip-install-siq0iev2/pycairo_567e7299d4f54403a99176ca7b282da6/.mesonpy-imon8tt4/meson-python-native-file.ini

        The Meson build system

        Version: 1.12.0

        Source dir: /tmp/pip-install-siq0iev2/pycairo_567e7299d4f54403a99176ca7b282da6

        Build dir: /tmp/pip-install-siq0iev2/pycairo_567e7299d4f54403a99176ca7b282da6/.mesonpy-imon8tt4

        Build type: native build

        Project name: pycairo

        Project version: 1.29.1

        C compiler for the host machine: cc (gcc 14.2.0 "cc (Debian 14.2.0-19) 14.2.0")

        C linker for the host machine: cc ld.bfd 2.44

        Host machine cpu family: aarch64

        Host machine cpu: aarch64

        Program python3 found: YES (/usr/bin/python3)

        Compiler for C supports arguments -Wall: YES

        Compiler for C supports arguments -Warray-bounds: YES

        Compiler for C supports arguments -Wcast-align: YES

        Compiler for C supports arguments -Wconversion: YES

        Compiler for C supports arguments -Wextra: YES

        Compiler for C supports arguments -Wformat=2: YES

        Compiler for C supports arguments -Wformat-nonliteral: YES

        Compiler for C supports arguments -Wformat-security: YES

        Compiler for C supports arguments -Wimplicit-function-declaration: YES

        Compiler for C supports arguments -Winit-self: YES

        Compiler for C supports arguments -Wmissing-format-attribute: YES

        Compiler for C supports arguments -Wmissing-noreturn: YES

        Compiler for C supports arguments -Wnested-externs: YES

        Compiler for C supports arguments -Wold-style-definition: YES

        Compiler for C supports arguments -Wpacked: YES

        Compiler for C supports arguments -Wpointer-arith: YES

        Compiler for C supports arguments -Wreturn-type: YES

        Compiler for C supports arguments -Wshadow: YES

        Compiler for C supports arguments -Wsign-compare: YES

        Compiler for C supports arguments -Wstrict-aliasing: YES

        Compiler for C supports arguments -Wundef: YES

        Compiler for C supports arguments -Wunused-but-set-variable: YES

        Compiler for C supports arguments -Wswitch-default: YES

        Compiler for C supports arguments -Wno-missing-field-initializers: YES

        Compiler for C supports arguments -Wno-unused-parameter: YES

        Compiler for C supports arguments -fno-strict-aliasing: YES

        Compiler for C supports arguments -fvisibility=hidden: YES

        Found pkg-config: YES (/usr/bin/pkg-config) 1.8.1

        Did not find CMake 'cmake'

        Found CMake: NO

        Run-time dependency cairo found: NO  (tried pkg-config)

        ../cairo/meson.build:31:12: ERROR: Dependency "cairo" not found (tried pkg-config)



        A full log can be found at /tmp/pip-install-siq0iev2/pycairo_567e7299d4f54403a99176ca7b282da6/.mesonpy-imon8tt4/meson-logs/meson-log.txt

        \[end of output\]

    note: This error originates from a subprocess, and is likely not a problem with pip.

  error: metadata-generation-failed

  Γ— Encountered error while generating package metadata.

  ╰─> See above for output.

  note: This is an issue with the package mentioned above, not pip.

  hint: See above for details.

  \[end of output\]

note: This error originates from a subprocess, and is likely not a problem with pip.

Any idea how I can fix this issue?

Running: Raspberry Pi 4 Model B Rev 1.2 with 4GB.

@tschofen Are you referring to the Debian instructions at Manual install - Mopidy? What are you trying to do: A global install or an install in a virtual environment? It’s difficult to guess from the command output only…

Whatever, the shared output says that cmake and cairo are not found in the environment.

Did you forget to install the required dependencies as shown in the above documentation?

$ sudo apt install \
    gir1.2-gst-plugins-base-1.0 \
    gir1.2-gstreamer-1.0 \
    gstreamer1.0-plugins-good \
    gstreamer1.0-plugins-ugly \
    gstreamer1.0-tools \
    libcairo2-dev \
    libgirepository-2.0-dev \
    python3-gst-1.0

As you can check (eg apt-cache depends --recurse libcairo2-dev | grep -c cmake), cmake and cairo are dependencies and will be present on your system (which version of the OS?) after those dependencies are installed.

I followed the Mopidy system packages instructions for Debian 13 Trixie. Mopidy itself installed without any errors. When I started installing extensions, I was able to install mopidy-iris, but mopidy-local is where the error happens. I haven’t installed anything else on this clean install.

apt-cache depends --recurse libcairo2-dev | grep -c cmake returns 68 . I did not install the dependencies you suggested so far. I was hoping the standard install should take care of all that.

cat /etc/os-release returns

PRETTY_NAME=β€œDebian GNU/Linux 13 (trixie)”

NAME=β€œDebian GNU/Linux”

VERSION_ID=β€œ13”

VERSION=β€œ13 (trixie)”

VERSION_CODENAME=trixie

DEBIAN_VERSION_FULL=13.6

ID=debian

HOME_URL=β€œhttps://www.debian.org/”

SUPPORT_URL=" Debian -- User Support "

BUG_REPORT_URL=β€œhttps://bugs.debian.org/”

I followed the Mopidy system packages instructions for Debian 13 Trixie. Mopidy itself installed without any errors.

But Mopidy-Local 4.x requires Mopidy 4.x and the latter is not yet available as Debian package. Thus when you install Mopidy-Local 4.0.x using pip then it tries to install Mopidy 4.x which requires pycairo whose install fails due to lack of libraries and tooling on the host.

Look for the parents of pycairo in the dependency graph:

(env) matthias@peitho:~/Projets/mopidy-dev/mopidy-local $
⏡ pipdeptree -p mopidy-local
mopidy-local==4.0.1
┣━━ βœ“ mopidy required: >=4.0.2 installed: 4.0.2
┃   ┣━━ βœ“ cyclopts required: >=3.12 installed: 4.11.0
┃   ┃   ┣━━ βœ“ attrs required: >=23.1.0 installed: 26.1.0
┃   ┃   ┣━━ βœ“ docstring_parser required: >=0.15,<4.0 installed: 0.18.0
┃   ┃   ┣━━ βœ“ rich required: >=13.6.0 installed: 15.0.0
┃   ┃   ┃   ┣━━ βœ“ markdown-it-py required: >=2.2.0 installed: 4.0.0
┃   ┃   ┃   ┃   ┗━━ βœ“ mdurl required: ~=0.1 installed: 0.1.2
┃   ┃   ┃   ┗━━ βœ“ Pygments required: >=2.13.0,<3.0.0 installed: 2.20.0
┃   ┃   ┗━━ βœ“ rich-rst required: >=1.3.1,<2.0.0 installed: 1.3.2
┃   ┃       ┣━━ βœ“ docutils required: Any installed: 0.22.4
┃   ┃       ┗━━ βœ“ rich required: >=12.0.0 installed: 15.0.0
┃   ┃           ┣━━ βœ“ markdown-it-py required: >=2.2.0 installed: 4.0.0
┃   ┃           ┃   ┗━━ βœ“ mdurl required: ~=0.1 installed: 0.1.2
┃   ┃           ┗━━ βœ“ Pygments required: >=2.13.0,<3.0.0 installed: 2.20.0
┃   ┣━━ βœ“ httpx required: >=0.28.1 installed: 0.28.1
┃   ┃   ┣━━ βœ“ anyio required: Any installed: 4.13.0
┃   ┃   ┃   ┗━━ βœ“ idna required: >=2.8 installed: 3.13
┃   ┃   ┣━━ βœ“ certifi required: Any installed: 2026.4.22
┃   ┃   ┣━━ βœ“ httpcore required: ==1.* installed: 1.0.9
┃   ┃   ┃   ┣━━ βœ“ certifi required: Any installed: 2026.4.22
┃   ┃   ┃   ┗━━ βœ“ h11 required: >=0.16 installed: 0.16.0
┃   ┃   ┗━━ βœ“ idna required: Any installed: 3.13
┃   ┣━━ βœ“ platformdirs required: >=4.3 installed: 4.9.6
┃   ┣━━ βœ“ pydantic required: >=2.10 installed: 2.13.3
┃   ┃   ┣━━ βœ“ annotated-types required: >=0.6.0 installed: 0.7.0
┃   ┃   ┣━━ βœ“ pydantic_core required: ==2.46.3 installed: 2.46.3
┃   ┃   ┃   ┗━━ βœ“ typing_extensions required: >=4.14.1 installed: 4.15.0
┃   ┃   ┣━━ βœ“ typing_extensions required: >=4.14.1 installed: 4.15.0
┃   ┃   ┗━━ βœ“ typing-inspection required: >=0.4.2 installed: 0.4.2
┃   ┃       ┗━━ βœ“ typing_extensions required: >=4.12.0 installed: 4.15.0
┃   ┣━━ βœ“ PyGObject required: >=3.50 installed: 3.56.2
┃   ┃   ┗━━ βœ“ pycairo required: >=1.16 installed: 1.29.0
┃   ┣━━ βœ“ pykka required: >=4.1 installed: 4.4.2
┃   ┣━━ βœ“ rich required: >=13.9 installed: 15.0.0
┃   ┃   ┣━━ βœ“ markdown-it-py required: >=2.2.0 installed: 4.0.0
┃   ┃   ┃   ┗━━ βœ“ mdurl required: ~=0.1 installed: 0.1.2
┃   ┃   ┗━━ βœ“ Pygments required: >=2.13.0,<3.0.0 installed: 2.20.0
┃   ┗━━ βœ“ tornado required: >=6.4.2 installed: 6.5.5
┣━━ βœ“ pykka required: >=4.1 installed: 4.4.2
┗━━ βœ“ uritools required: >=4.0.3 installed: 6.0.2

Install the dependencies. Remove the Mopidy DEB packages. Then installing both Mopidy 4.x and Mopidy-Local 4.x in a virtual environment should work.

Looks like I’m too early in installing Mopidy 4 as mopidy-iris isn’t compatible with it yet. What other web front ends are ready for Mopidy 4?

Version info:

Name: mopidy

Version: 4.0.2

Summary: Mopidy is an extensible music server written in Python

Home-page: https://mopidy.com/

Author:

Author-email: Stein Magnus Jodal stein.magnus@jodal.no

License: Apache-2.0

Location: /opt/mopidy/venv/lib/python3.13/site-packages

Requires: cyclopts, httpx, platformdirs, pydantic, pygobject, pykka, rich, tornado

Required-by: Mopidy-Iris, mopidy-local

-–

Name: Mopidy-Iris

Version: 3.70.0

Summary: Fully-featured Mopidy frontend client

Home-page: GitHub - jaedb/Iris: Discover, explore and manage your music library across multiple sources with this beautiful web-based interface. Iris is a Mopidy frontend extension. Β· GitHub

Author: James Barnsley

Author-email: james@barnsley.nz

License: Apache License, Version 2.0

Location: /opt/mopidy/venv/lib/python3.13/site-packages

Requires: Mopidy, Pykka, setuptools

Required-by:

Log info: sudo journalctl -u mopidy -b --no-pager

Sep 06 12:23:09 rpi systemd[1]: Started mopidy.service - Mopidy music server.

Sep 06 12:23:10 rpi mopidy[7252]: TU: error: ../src/freedreno/vulkan/tu_knl.cc:395: failed to open device /dev/dri/renderD128 (VK_ERROR_INCOMPATIBLE_DRIVER)

Sep 06 12:23:10 rpi mopidy[7252]: MESA: error: Opening /dev/dri/card1 failed: Permission denied

Sep 06 12:23:10 rpi mopidy[7252]: MESA: error: Opening /dev/dri/card0 failed: Permission denied

Sep 06 12:23:10 rpi mopidy[7252]: MESA: error: Opening /dev/dri/renderD128 failed: Permission denied

Sep 06 12:23:12 rpi mopidy[7249]: 12:23:12 WARNING MainThread mopidy._app.extensions

Sep 06 12:23:12 rpi mopidy[7249]: Extensions with config errors: m3u

Sep 06 12:23:12 rpi mopidy[7249]: WARNING MainThread mopidy._app.config

Sep 06 12:23:12 rpi mopidy[7249]: Found β€˜m3u’ configuration errors. The extension has been

Sep 06 12:23:12 rpi mopidy[7249]: automatically disabled:

Sep 06 12:23:12 rpi mopidy[7249]: WARNING MainThread mopidy._app.config

Sep 06 12:23:12 rpi mopidy[7249]: m3u/base_dir: Unexpanded β€˜$…’ in path β€˜$XDG_MUSIC_DIR’

Sep 06 12:23:12 rpi mopidy[7249]: WARNING MainThread mopidy._app.config

Sep 06 12:23:12 rpi mopidy[7249]: m3u/enabled: Extension stopped due to config errors

Sep 06 12:23:12 rpi mopidy[7249]: ERROR MainThread mopidy._app.server

Sep 06 12:23:12 rpi mopidy[7249]: Extension iris failed during setup. This might have left the

Sep 06 12:23:12 rpi mopidy[7249]: registry in a bad state.

Sep 06 12:23:12 rpi mopidy[7249]: Traceback (most recent call last):

Sep 06 12:23:12 rpi mopidy[7249]: File

Sep 06 12:23:12 rpi mopidy[7249]: "/opt/mopidy/venv/lib/python3.13/site-packages/mopidy/_app/ser

Sep 06 12:23:12 rpi mopidy[7249]: ver.py", line 37, in command

Sep 06 12:23:12 rpi mopidy[7249]: record.extension.setup(registry)

Sep 06 12:23:12 rpi mopidy[7249]: ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^

Sep 06 12:23:12 rpi mopidy[7249]: File

Sep 06 12:23:12 rpi mopidy[7249]: "/opt/mopidy/venv/lib/python3.13/site-packages/mopidy_iris/__i

Sep 06 12:23:12 rpi mopidy[7249]: nit__.py", line 43, in setup

Sep 06 12:23:12 rpi mopidy[7249]: from .frontend import IrisFrontend

Sep 06 12:23:12 rpi mopidy[7249]: File

Sep 06 12:23:12 rpi mopidy[7249]: "/opt/mopidy/venv/lib/python3.13/site-packages/mopidy_iris/fro

Sep 06 12:23:12 rpi mopidy[7249]: ntend.py", line 5, in

Sep 06 12:23:12 rpi mopidy[7249]: from .mem import iris

Sep 06 12:23:12 rpi mopidy[7249]: File

Sep 06 12:23:12 rpi mopidy[7249]: "/opt/mopidy/venv/lib/python3.13/site-packages/mopidy_iris/mem

Sep 06 12:23:12 rpi mopidy[7249]: .py", line 1, in

Sep 06 12:23:12 rpi mopidy[7249]: from .core import IrisCore

Sep 06 12:23:12 rpi mopidy[7249]: File

Sep 06 12:23:12 rpi mopidy[7249]: "/opt/mopidy/venv/lib/python3.13/site-packages/mopidy_iris/cor

Sep 06 12:23:12 rpi mopidy[7249]: e.py", line 13, in

Sep 06 12:23:12 rpi mopidy[7249]: from pkg_resources import parse_version

Sep 06 12:23:12 rpi mopidy[7249]: ModuleNotFoundError: No module named β€˜pkg_resources’

Sep 06 12:30:22 rpi systemd[1]: Stopping mopidy.service - Mopidy music server…

Sep 06 12:30:23 rpi systemd[1]: mopidy.service: Deactivated successfully.

Sep 06 12:30:23 rpi systemd[1]: Stopped mopidy.service - Mopidy music server.

Sep 06 12:30:23 rpi systemd[1]: mopidy.service: Consumed 3.685s CPU time.

Sep 06 12:30:23 rpi systemd[1]: Started mopidy.service - Mopidy music server.

Sep 06 12:30:24 rpi mopidy[7310]: 12:30:24 WARNING MainThread mopidy._app.extensions

Sep 06 12:30:24 rpi mopidy[7310]: Extensions with config errors: m3u

Sep 06 12:30:24 rpi mopidy[7310]: WARNING MainThread mopidy._app.config

Sep 06 12:30:24 rpi mopidy[7310]: Found β€˜m3u’ configuration errors. The extension has been

Sep 06 12:30:24 rpi mopidy[7310]: automatically disabled:

Sep 06 12:30:24 rpi mopidy[7310]: WARNING MainThread mopidy._app.config

Sep 06 12:30:24 rpi mopidy[7310]: m3u/base_dir: Unexpanded β€˜$…’ in path β€˜$XDG_MUSIC_DIR’

Sep 06 12:30:24 rpi mopidy[7310]: WARNING MainThread mopidy._app.config

Sep 06 12:30:24 rpi mopidy[7310]: m3u/enabled: Extension stopped due to config errors

Sep 06 12:30:24 rpi mopidy[7310]: ERROR MainThread mopidy._app.server

Sep 06 12:30:24 rpi mopidy[7310]: Extension iris failed during setup. This might have left the

Sep 06 12:30:24 rpi mopidy[7310]: registry in a bad state.

Sep 06 12:30:24 rpi mopidy[7310]: Traceback (most recent call last):

Sep 06 12:30:24 rpi mopidy[7310]: File

Sep 06 12:30:24 rpi mopidy[7310]: "/opt/mopidy/venv/lib/python3.13/site-packages/mopidy/_app/ser

Sep 06 12:30:24 rpi mopidy[7310]: ver.py", line 37, in command

Sep 06 12:30:24 rpi mopidy[7310]: record.extension.setup(registry)

Sep 06 12:30:24 rpi mopidy[7310]: ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^

Sep 06 12:30:24 rpi mopidy[7310]: File

Sep 06 12:30:24 rpi mopidy[7310]: "/opt/mopidy/venv/lib/python3.13/site-packages/mopidy_iris/__i

Sep 06 12:30:24 rpi mopidy[7310]: nit__.py", line 43, in setup

Sep 06 12:30:24 rpi mopidy[7310]: from .frontend import IrisFrontend

Sep 06 12:30:24 rpi mopidy[7310]: File

Sep 06 12:30:24 rpi mopidy[7310]: "/opt/mopidy/venv/lib/python3.13/site-packages/mopidy_iris/fro

Sep 06 12:30:24 rpi mopidy[7310]: ntend.py", line 5, in

Sep 06 12:30:24 rpi mopidy[7310]: from .mem import iris

Sep 06 12:30:24 rpi mopidy[7310]: File

Sep 06 12:30:24 rpi mopidy[7310]: "/opt/mopidy/venv/lib/python3.13/site-packages/mopidy_iris/mem

Sep 06 12:30:24 rpi mopidy[7310]: .py", line 1, in

Sep 06 12:30:24 rpi mopidy[7310]: from .core import IrisCore

Sep 06 12:30:24 rpi mopidy[7310]: File

Sep 06 12:30:24 rpi mopidy[7310]: "/opt/mopidy/venv/lib/python3.13/site-packages/mopidy_iris/cor

Sep 06 12:30:24 rpi mopidy[7310]: e.py", line 16, in

Sep 06 12:30:24 rpi mopidy[7310]: from mopidy.models.serialize import ModelJSONEncoder

Sep 06 12:30:24 rpi mopidy[7310]: ModuleNotFoundError: No module named β€˜mopidy.models.serialize’

According to Provide (alpha) version compatible with Mopidy 4.0.0 alpha versions Β· Issue #999 Β· jaedb/Iris Β· GitHub you’re right Iris doesn’t support Mopidy 4.

For the other frontend, well I feel uncomfortable since I myself found exactly what I was looking for with Argos (not a web frontend), but I’m not at all objective since I wrote it :slight_smile:

I’ll have to look for alternatives, or wait and see as I’m mostly accessing Mopidy from iOS and Mac.

Thank you for your help.