INSTALLING MPF on RP5 - Issues

97 views
Skip to first unread message

Jason McNally

unread,
Jan 14, 2026, 1:02:25 AMJan 14
to MPF Users
Hi All, 

I have not been able to get MPF installed successfully on fresh OS installs on RP4 or RP5 (my preference) or even ubuntu Using the instructions on the MPF website.

I did manage to get mpf version 0.56.2 to install, on the RP5 but no luck with the MC. See attached error logs.

pyenv , pip 25.3, python3.9.18 are installed

Any help would be greatly appreciated! Thank you
RP5-mc-install.txt

cobra18t

unread,
Jan 17, 2026, 3:21:33 PMJan 17
to MPF Users
The last time I installed on a Pi 5 was about a year ago and I struggled with the installation. I attached my command history here. This is what I noticed from the command history:
  1. I was not using "sudo" the first time I tried to install mpf and had to back out and try again with sudo
  2. I attempted the mpf-mc install multiple times and seemed to find a number of packages that it was not installing as dependencies so I started to install them manually. It took a few iterations before it finally worked.
Ideally someone could take this and fix the dependency installation issues of the mpf-mc install, but I am not sure how to do that. I just kept looking for things it thought were missing and installed them. It was a pain.
bash_history_pi_cut.txt

Jason McNally

unread,
Jan 18, 2026, 2:08:44 AMJan 18
to MPF Users
Hi Thomas, Thank you for that, will take a look. I wonder how long it has been since anyone has been able to install on RP4, RP5 or Ubuntu, Anyone out there had recent success in Linux?

Marc Rechté

unread,
Jan 18, 2026, 10:51:53 AMJan 18
to MPF Users
I confirm a successful mpf-mc installation on a rpi5. 

I used Raspberry Pi OS Lite "November 19th 2024 Debian version: 12 (bookworm) Kernel version: 6.6" from https://www.raspberrypi.com/software/operating-systems/

Also make sure python version is 3.11.

Hope this can help.

cobra18t

unread,
Feb 2, 2026, 2:04:40 PMFeb 2
to MPF Users
Were you able to get the Pi5 installation working? I installed 0.57.3 when I installed on an Pi5 about a year ago.

So this is what I have:
  • Pi5 with Raspberry OS (v12 bookworm)
  • Python version 3.11.2
  • mpf version 0.57.3
  • mpf-mc version 0.57.1

Jason McNally

unread,
Feb 3, 2026, 3:37:32 AMFeb 3
to MPF Users
Hi, Thanks for your suggestions. No luck so far

Jason McNally

unread,
Feb 3, 2026, 4:05:36 AMFeb 3
to MPF Users
Hi All, No luck getting mpf running on any linux system. My latest try was with a RP5 :
  • Pi5 with Raspberry OS (v12 bookworm)
  • Python version 3.11.2
  • mpf version 0.57.3
  • mpf-mc version 0.57.1
MPF itself seems to install ok most of the time, but the MC has never worked over the more than a dozen attempts. I followed these instructions to the letter :
Have tried it with and without the virtual environment using "--break-system-packages"
*** , see attached copies of the script running.
I have not heard from anyone that has done a linux install recently so perhaps something has changed and made it a lot harder?
Any help would be greatly appreciated. Thanks!
session2.txt
session.txt

cobra18t

unread,
Feb 3, 2026, 8:24:52 PMFeb 3
to MPF Users
I just tried installing on a Pi5 with the 64bit Bookworm Full Version of RPi OS (with python 3.11.2) using the following commands. I am looking for any assistance regarding the error I get after an apparently successful installation:

python -m venv mpf
source mpf/bin/activate

sudo apt-get update

sudo apt-get install libssl-dev libncurses-dev libffi-dev libreadline-dev libbz2-dev libsqlite3-dev liblzma-dev tk-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libsdl2-mixer-dev libavfilter-dev libsdl2-dev libsdl2-image-dev libavcodec-dev libavformat-dev libswscale-dev libavdevice-dev

pip install mpf
pip install mpf-mc

Everything appears to install correctly without any errors and the pip list shows everything is installed in the virtual environment. But when I try to check the mpf command with a simple "mpf --version" I get the following error:

(mpf) pi@:~ $ mpf --version
Traceback (most recent call last):
  File "/home/pi/mpf/bin/mpf", line 8, in <module>
    sys.exit(run_from_command_line())
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/mpf/lib/python3.11/site-packages/mpf/commands/__init__.py", line 194, in run_from_command_line
    CommandLineUtility(path).execute()
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/mpf/lib/python3.11/site-packages/mpf/commands/__init__.py", line 133, in __init__
    self.get_external_commands()
  File "/home/pi/mpf/lib/python3.11/site-packages/mpf/commands/__init__.py", line 141, in get_external_commands
    command, function_ref = entry_point.load()()
                            ^^^^^^^^^^^^^^^^^^
  File "/home/pi/mpf/lib/python3.11/site-packages/pkg_resources/__init__.py", line 2770, in load
    self.require(*args, **kwargs)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/mpf/lib/python3.11/site-packages/pkg_resources/__init__.py", line 2798, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/mpf/lib/python3.11/site-packages/pkg_resources/__init__.py", line 896, in resolve
    dist = self._resolve_dist(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/pi/mpf/lib/python3.11/site-packages/pkg_resources/__init__.py", line 937, in _resolve_dist
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'ruamel.yaml.clib>=0.2.7; platform_python_implementation == "CPython" and python_version < "3.13"' distribution was not found and is required by ruamel.yaml


I do not get this error before the installation of mpf-mc. So something in the installation of mpf-mc is corrupting something for mpf. Any ideas? Here is my pip list for reference:
(mpf) pi@:~ $ pip list
Package            Version
------------------ -----------
apigpio-mpf        0.0.4
asciimatics        1.15.0
autocommand        2.2.2
backports.tarfile  1.2.0
certifi            2026.1.4
charset-normalizer 3.4.4
docutils           0.22.4
ffpyplayer         4.5.1
future             1.0.0
idna               3.11
jaraco.context     6.1.0
jaraco.functools   4.4.0
jaraco.stream      3.0.4
Kivy               2.2.1
Kivy-Garden        0.1.5
more-itertools     10.8.0
mpf                0.57.4
mpf-mc             0.57.1
packaging          23.2
Pillow             9.5.0
pip                23.0.1
prompt-toolkit     3.0.43
protobuf           3.14.0
psutil             5.9.8
pyfiglet           1.0.4
Pygments           2.16.1
pyserial           3.5
pyserial-asyncio   0.6
python-dateutil    2.9.0.post0
python-osc         1.7.4
pytz               2025.2
pyusb              1.1.0
requests           2.28.2
ruamel.yaml        0.18.6
ruamel.yaml.clib   0.2.15
setuptools         72.2.0
six                1.17.0
smbus2             0.6.0
smbus2-asyncio     0.0.5
sortedcontainers   2.4.0
terminaltables     3.1.10
urllib3            1.26.20
wcwidth            0.5.3

Marc Rechté

unread,
Feb 4, 2026, 10:14:53 AMFeb 4
to MPF Users
I reproduced your error. You may fix it with:

pip install ruamel.yaml.clib==0.2.8 

cobra18t

unread,
Feb 4, 2026, 11:58:19 AMFeb 4
to MPF Users
Thank you! Reverting to ruamel.yaml.clib version 0.2.8 does indeed solve my problem!

OP, could you try these steps to see if they work for you? You would want to make your virtual environment the default environment in the future.

python -m venv mpf
source mpf/bin/activate

sudo apt-get update

sudo apt-get install libssl-dev libncurses-dev libffi-dev libreadline-dev libbz2-dev libsqlite3-dev liblzma-dev tk-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libsdl2-mixer-dev libavfilter-dev libsdl2-dev libsdl2-image-dev libavcodec-dev libavformat-dev libswscale-dev libavdevice-dev

pip install mpf
pip install mpf-mc

pip install ruamel.yaml.clib==0.2.8 

Jason McNally

unread,
Feb 9, 2026, 9:37:52 PM (10 days ago) Feb 9
to MPF Users
Hi Guys, Yes, that worked well, thank you all very much!
Reply all
Reply to author
Forward
0 new messages