MPF 0.56 macOS installation thread

350 views
Skip to first unread message

Brian Madden

unread,
Aug 4, 2022, 3:23:26 PM8/4/22
to MPF Users
Hi Everyone,

You probably saw in this thread that I'm reworking the MPF installation process.

I have the raw steps for installation on macOS ready to go. I would love for people to try this if you're struggling to get MPF 0.56 (current dev branch) installed on your mac.


These instructions are for macOS, probably around 10.15 or so, and newer. (tested locally on 12.5 and 12.6). These will only work with Python 3.9 currently.

This process is manual now which involves a lot of steps including manual downloads. Once we get it dialed-in, we'll update it and get the files in the proper locations so it's a more simple install.

Please post any mac-related installation issues/questions/problems here and we will work it out together. New Windows and Linux installers will be posted in the next few days as well. (I will create separate threads for them.)

Thanks!
Brian

Howard F.

unread,
Aug 4, 2022, 4:46:26 PM8/4/22
to mpf-...@googlegroups.com
Thank you. User friendly I hope with links if needed. 

Sent from my iPhone

On Aug 4, 2022, at 2:23 PM, Brian Madden <br...@fastpinball.com> wrote:

Hi Everyone,
--
You received this message because you are subscribed to the Google Groups "MPF Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mpf-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mpf-users/40438054-725c-4d59-9e26-fcb9b185adffn%40googlegroups.com.

Doug Spata

unread,
Aug 20, 2022, 1:57:11 PM8/20/22
to MPF Users
Hello!

I'm trying to install MPF on my Mac (running Monterey 12.4) and am following the instructions here: https://docs.missionpinball.org/en/latest/install/mac.html
I breezed through the first five steps (Python, Homebrew and pipx installed), but when I copy and paste the code to download MPF (pipx install mpf[all] --pip-args="--pre" --python $(which python3) --verbose --include-deps) I get:

zsh: no matches found: mpf[all]

I've also tried running sudo pipx install mpf[all] --pip-args="--pre" --python $(which python3) --verbose --include-deps and get the same result. Any help would be appreciated.
Also, is there a way to download the latest completed version of MPF, rather than the 0.56 dev version?

Brian Madden

unread,
Aug 20, 2022, 6:27:32 PM8/20/22
to MPF Users
typo on my end. Put quotes around "mpf[all]". I just updated the docs.

The latest completed (well, "completed" is not really accurate), but the latest non-dev version is 0.55 which you can install like you always have been able to. So you can follow those instructions which are the default versions that come up on the docs site here: https://docs.missionpinball.org/en/stable/install/index.html

But you won't be able to use the new installer or anything since that is in the dev version.

Brian Madden

unread,
Aug 20, 2022, 6:41:45 PM8/20/22
to MPF Users
Actually, I'm refining this procedure. I would recommend doing "mpf[cli]" instead of "mpf[all]" because the cli option installs the stuff for mpf and the text ui (versus "all" installs everything), but something in the "all" package isn't installing properly on my mac. Dunno what it is at the moment so you can just avoid that potential by installing with the cli option instead of all.

Doug Spata

unread,
Aug 20, 2022, 8:31:33 PM8/20/22
to MPF Users
Thanks. I added quotes and changed it to "mpf[cli]". Here's the new error message:

pipx >(analyze_pip_output:298): pip failed to build package:
    ruamel.yaml

Some possibly relevant errors from pip install:
    error: subprocess-exited-with-error
    ext/_ruamel_yaml.c:23877:5: error: expression is not assignable
    ext/_ruamel_yaml.c:23879:5: error: expression is not assignable
    ext/_ruamel_yaml.c:24050:5: error: expression is not assignable
    ext/_ruamel_yaml.c:24052:5: error: expression is not assignable
    error: command '/usr/bin/clang' failed with exit code 1
    error: legacy-install-failure

pipx >(rmdir:55): removing directory /Users/douglasspata/.local/pipx/venvs/mpf
Error installing mpf from spec 'mpf[cli]'.

Brian Madden

unread,
Aug 21, 2022, 11:28:49 AM8/21/22
to mpf-...@googlegroups.com
This is weird to me and I don’t understand what’s happening. These errors indicate that the setup is trying to compile ruamel.yaml from source, but their docs say that’s not necessary.

What happens if you try to install ruamel.yaml on its own? Like this:

pip3 install ruamel.yaml==0.15.100

I am not home now but can look into this more later today. Is this an M1 Mac? (Which should be fine, we’ve done installs on 4-5 different M1 macs and none of them had this. 

Can you provide any other details about your environment?



--
You received this message because you are subscribed to the Google Groups "MPF Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mpf-users+...@googlegroups.com.
--
Brian Madden
Product Management / Tech Marketing
FAST Pinball | br...@fastpinball.com | 415.314.1193

Doug Spata

unread,
Aug 21, 2022, 9:41:27 PM8/21/22
to MPF Users
When I run tpip3 install --no-deps ruamel.yaml==0.15.100 I get a similar error message:

  62 warnings and 4 errors generated.

      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
 
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> ruamel.yaml

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Is there something specific I can locate for you in the download log? Thanks for your help and patience with this.


Doug Spata

unread,
Aug 21, 2022, 9:42:45 PM8/21/22
to MPF Users
Edit: I ran pip3 install --no-deps ruamel.yaml==0.15.100. Don't know how that extra t got in there.

Alex Ballingall

unread,
Sep 4, 2022, 5:23:28 PM9/4/22
to MPF Users
Hi there,
at least trying to get this to run on a M1 machine of my own. Getting this error message when trying to run the mc_demo file:



Process Process-1:

Traceback (most recent call last):

File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap

self.run()

File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/process.py", line 108, in run

self._target(*self._args, **self._kwargs)

File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/mpf/commands/both.py", line 14, in _start_mc

module.Command(mpf_path, machine_path, args + ["--both"])

File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/mpfmc/commands/mc.py", line 209, in __init__

from mpfmc.core.mc import MpfMc

File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/mpfmc/core/mc.py", line 44, in <module>

from mpfmc.assets.bitmap_font import BitmapFontAsset

File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/mpfmc/assets/bitmap_font.py", line 3, in <module>

from mpfmc.uix.bitmap_font.bitmap_font import BitmapFont

ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/mpfmc/uix/bitmap_font/bitmap_font.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace '_IMG_Load'

mike wiz

unread,
Sep 23, 2022, 6:07:12 PM9/23/22
to MPF Users
Hello,

I just did a clean install of Windows 10 home edition 64 bit.

I first installed python 3.9.13

I then followed the instructions here  https://docs.missionpinball.org/en/latest/install/windows.html to install MPF

I'm getting this error in the mc logs.

Any ideas?  Trying to install this on a INTEL NUC6i3SYH

022-09-23 14:00:44,761 : kivy : Factory: 189 symbols loaded
2022-09-23 14:00:45,675 : kivy : ImageLoaderFFPy: Using ffpyplayer 4.3.5
2022-09-23 14:00:45,676 : kivy : Image: Providers: img_tex, img_dds, img_sdl2, img_pil, img_ffpyplayer
2022-09-23 14:00:46,142 : kivy : VideoGstplayer: Using Gstreamer 1.18.5.0
2022-09-23 14:00:46,142 : kivy : Video: Provider: gstplayer
2022-09-23 14:00:46,862 : kivy : mpfmc.core.audio library could not be loaded. Audio features will not be available
2022-09-23 14:00:46,863 : kivy : Loading MPF-MC controller
.
.
.
.
2022-09-23 14:00:49,668 : kivy : DLL load failed while importing sound_file: The specified procedure could not be found.

Traceback (most recent call last):
  File "C:\Users\rat_k\.local\pipx\venvs\mpf\lib\site-packages\mpfmc\commands\mc.py", line 225, in __init__
    MpfMc(options=vars(args),
  File "C:\Users\rat_k\.local\pipx\venvs\mpf\lib\site-packages\mpfmc\core\mc.py", line 151, in __init__
    create_config_collections(self, self.machine_config['mpf-mc']['config_collections'])
  File "C:\Users\rat_k\.local\pipx\venvs\mpf\lib\site-packages\mpfmc\core\config_collection.py", line 82, in create_config_collections
    imported_module = import_module(module)
  File "C:\Program Files\Python39\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "C:\Users\rat_k\.local\pipx\venvs\mpf\lib\site-packages\mpfmc\config_collections\sound_loop_set.py", line 1, in <module>
    from mpfmc.core.audio.audio_exception import AudioException
  File "C:\Users\rat_k\.local\pipx\venvs\mpf\lib\site-packages\mpfmc\core\audio\__init__.py", line 7, in <module>
    from mpfmc.core.audio.audio_interface import AudioInterface
  File "mpfmc/core/audio/audio_interface.pyx", line 1, in init mpfmc.core.audio.audio_interface
ImportError: DLL load failed while importing sound_file: The specified procedure could not be found.

Brian Madden

unread,
Sep 23, 2022, 7:56:15 PM9/23/22
to MPF Users
I'm not sure what the problem could be. I just checked the builds and it looks like they are all building ok (this is the process in the cloud that generates the installers that get called and are used when you use pipx). That process runs a bunch of built-in tests which are all passing in the cloud build. What version of mpf and mpf-mc did you install? (You can do "pipx list" from the command line, I think, to see the specific versions.)

Are you running your own machine config here, or the mc demo, or the tests?

I forget off the top of my head the exact command to run the built-in tests, I think it's something like:

python3 -m unittest discover mpfmc.tests

I'm curious is that works? If so then there's something in your machine that is not included in the tests (which we can figure out and add).

I'm out of town this weekend but back monday and can try to see if I can reproduce this on my end if you can't sort it out before that.
Brian

mike wiz

unread,
Sep 24, 2022, 9:13:44 AM9/24/22
to MPF Users
Hi Brian,

I tried running my own config. 

I re-installed windows again and this time installed python 3.7.8 but no difference, same error.

Here is what I see when I run pipx list

venvs are in C:\Users\rat_k\.local\pipx\venvs
apps are exposed on your $PATH at C:\Users\rat_k\.local\bin
   package mpf 0.56.0.dev33, installed using Python 3.7.8
    - futurize.exe
    - mpf.exe
    - pasteurize.exe
    - pyfiglet.exe
    - pyserial-miniterm.exe
    - pyserial-ports.exe
    - pywin32_postinstall.py
    - pywin32_testall.py

Brian Madden

unread,
Sep 25, 2022, 12:02:06 PM9/25/22
to MPF Users
Can you try running the mc demo from the mpf examples repo? (There are instructions for that on the same docs page.) Use the arrow keys to navigate slides which will trigger a sound. And maybe try the unit tests as I wrote earlier too. We need to determine if this is something from your machine or if the windows build is broken but our tests don't cover it.

mike wiz

unread,
Sep 26, 2022, 9:54:48 AM9/26/22
to MPF Users
Do I have to download the unit tests?

I tried running python -m unittest discover mpfmc.tests and got an error message like file not found.

I tried running the mc_demo and demo_man examples and get the same message:

mpfmc: Mission Pinball Framework Media Controller v0.56.0-dev34
mpfmc: Mission Pinball Framework Game Engine v0.56.0-dev33
mpfmc: Machine path: C:\Users\rat_k\OneDrive\Desktop\mpf-examples-dev\demo_man
mpfmc: Starting clock at 60.0Hz
kivy: Text: Provider: sdl2

kivy: DLL load failed while importing sound_file: The specified procedure could not be found.
Traceback (most recent call last):
  File "C:\Users\rat_k\.local\pipx\venvs\mpf\lib\site-packages\mpfmc\commands\mc.py", line 225, in __init__
    MpfMc(options=vars(args),
  File "C:\Users\rat_k\.local\pipx\venvs\mpf\lib\site-packages\mpfmc\core\mc.py", line 151, in __init__
    create_config_collections(self, self.machine_config['mpf-mc']['config_collections'])
  File "C:\Users\rat_k\.local\pipx\venvs\mpf\lib\site-packages\mpfmc\core\config_collection.py", line 82, in create_config_collections
    imported_module = import_module(module)
  File "C:\Users\rat_k\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py", line 127, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "C:\Users\rat_k\.local\pipx\venvs\mpf\lib\site-packages\mpfmc\config_collections\sound_loop_set.py", line 1, in <module>
    from mpfmc.core.audio.audio_exception import AudioException
  File "C:\Users\rat_k\.local\pipx\venvs\mpf\lib\site-packages\mpfmc\core\audio\__init__.py", line 7, in <module>
    from mpfmc.core.audio.audio_interface import AudioInterface
  File "mpfmc/core/audio/audio_interface.pyx", line 1, in init mpfmc.core.audio.audio_interface
ImportError: DLL load failed while importing sound_file: The specified procedure could not be found.
kivy: Stopping child threads... (0 remaining)
kivy: All child threads stopped.
INFO : Machine : Starting the main run loop.
INFO : Machine : Shutting down...
INFO : EventManager : Event: ======'shutdown'====== Args={}
ERROR : root : Received second SIGINT. Will exit ungracefully!
NoneType: None
Message has been deleted

Ernie Silverberg

unread,
Nov 2, 2022, 9:44:25 PM11/2/22
to MPF Users
Mike, did you ever get this figured out? 

Doug Spata

unread,
Jan 8, 2023, 10:25:28 PM1/8/23
to MPF Users
I got up to the last step, installing MPF-MC, and am getting this error code:

XXX@XXX-iMac ~ % pipx inject mpf mpf-mc --pip-args="--pre" --verbose --include-deps --include-apps
pipx >(setup:757): pipx version is 1.1.0
pipx >(setup:758): Default python interpreter is '/opt/homebrew/Cellar/pipx/1.1.0/libexec/bin/python3.10'
pipx >(run_pipx_command:169): Virtual Environment location is /Users/douglasspata/.local/pipx/venvs/mpf
pipx >(needs_upgrade:69): Time since last upgrade of shared libs, in seconds: 551778. Upgrade will be run by pipx if greater than 2592000.
pipx >(package_name_from_spec:323): Determined package name: mpf-mc
pipx >(package_name_from_spec:324): Package name determined in 0.0s
pipx >(_parsed_package_to_package_or_url:128): cleaned package spec: mpf-mc
installing mpf-mc...
pipx >(run_subprocess:173): running /Users/douglasspata/.local/pipx/venvs/mpf/bin/python -m pip install --pre mpf-mc
pipx >(subprocess_post_check_handle_pip_error:335): '/Users/douglasspata/.local/pipx/venvs/mpf/bin/python -m pip install --pre mpf-mc' failed
pipx >(subprocess_post_check_handle_pip_error:352): Fatal error from pip prevented installation. Full pip output in file:
    /Users/douglasspata/.local/pipx/logs/cmd_2023-01-08_22.16.22_pip_errors.log

pipx >(analyze_pip_output:298): pip failed to build packages:
    mpf-mc
    ffpyplayer
    kivy

    ruamel.yaml

Some possibly relevant errors from pip install:
    ld: warning: directory not found for option '-F/Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.4.sdk/System/Library/Frameworks'
    b"Package libavcodec was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libavcodec.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libavcodec' found\nPackage libavdevice was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libavdevice.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libavdevice' found\nPackage libavfilter was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libavfilter.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libavfilter' found\nPackage libavformat was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libavformat.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libavformat' found\nPackage libavutil was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libavutil.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libavutil' found\nPackage libswscale was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libswscale.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libswscale' found\nPackage libswresample was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libswresample.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libswresample' found\nPackage libpostproc was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libpostproc.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libpostproc' found\n"
    /private/var/folders/n7/96tzx7_97tj_khrszjndh4jw0000gn/T/pip-install-xaqryu_7/ffpyplayer_1a38f644125e49ecb924b11db34677e9/ffpyplayer/clib/misc.h:6:10: fatal error: 'libavcodec/avcodec.h' file not found
Error installing mpf-mc.

It looks like some libraries or directories aren't downloading. I tried re-installing Homebrew (step 2) and then re-installing the libraries (step 3), but keep getting the same message. Could I have skipped a step? Is there a way to download these specific libraries or directories?
Reply all
Reply to author
Forward
0 new messages