Installing MPF On Ubuntu 16.04

77 views
Skip to first unread message

Compy

unread,
Oct 25, 2016, 1:16:11 PM10/25/16
to MPF Users
Greetings all,

I followed the MPF installation steps on Ubuntu 16.04. I downloaded the MPF tarball, extracted, and ran ./install, there were no errors after I selected the hardware to use.  I then executed the pip3 install mpf-mc command, and there were also no errors.

However, my system cannot find the 'mpf' command when I execute it. However running python3 -m unittest discover mpf, all tests pass, so it looks like the libraries are installed, but not the command line script.  Does anyone here have any ideas? I even turned the computer off and on again, so I've exhausted every troubleshooting technique!

Thanks a bunch,
Jimmy

Jeremy Wilson

unread,
Oct 25, 2016, 1:58:51 PM10/25/16
to MPF Users
You probably need to add a symlink to the mpf script in your path.

do "echo $PATH" and pick one of those directories, then change to that directory (/usr/local/bin is popular) and add the symlink:

ln -s /path/to/mpf mpf


If you don't know where mpf is on the machine, try:

find / -name "mpf"

Compy

unread,
Oct 25, 2016, 4:21:13 PM10/25/16
to MPF Users
For some reason, the install script didn't create the 'mpf' command script in my PATH.

I created a simple bash script that calls python3 -m mpf $* and all is well.

Many thanks to Jan for looking into the issue! Thanks for the suggestion, Jeremy!

jabdoa

unread,
Oct 27, 2016, 4:54:38 PM10/27/16
to MPF Users
As a small follow-up: This is caused by running pip3 install mpf/mpf-mc as non-root user which will install the package into the user home python dir. However, this is not in the path by default. To fix this you can either add that path or reinstall mpf as root using pip3 uninstall mpf; sudo pip3 install mpf. This will properly create the script in /usr/local/bin/mpf.


Jan

Compy

unread,
Oct 27, 2016, 9:34:02 PM10/27/16
to MPF Users
Indeed!

Many thanks to everyone who gave advice!  Not to be nitpicky, but the documentation for Linux installation (http://docs.missionpinball.org/en/stable/install/linux.html) should probably mention to use sudo for that one step.

Thanks!

jabdoa

unread,
Oct 28, 2016, 3:46:44 AM10/28/16
to MPF Users
Hi Jimmy,

that is indeed a good idea. If you want to get the credits for that, just click 

on the top left ;-). 


Jan

Compy

unread,
Oct 28, 2016, 11:53:43 AM10/28/16
to MPF Users
Oh slick! PR submitted!

Thanks for the link!

jabdoa

unread,
Oct 28, 2016, 12:13:48 PM10/28/16
to MPF Users
And merged. Thanks Jimmy!


Jan
Reply all
Reply to author
Forward
0 new messages