Installing MPF on linux the right way #115
Replies: 7 comments
-
ADDENTUM for P-Roc Install P-Rroc driver the right wayThe only sudo make install, installs in /usr/local. The python packages are not system-installed, and are installed by user, not root. Download and unpack "debian installer 0.55":
Install:
|
Beta Was this translation helpful? Give feedback.
-
Thanks gbouthenot, |
Beta Was this translation helpful? Give feedback.
-
Thank you for your kind message. I am glad this post has been useful ! |
Beta Was this translation helpful? Give feedback.
-
Hi there, thanks gbouthenot for this complete installation tutorial ! Just a share if anyone has the same trouble, last week I tried to install a P-ROC driver board on Ubuntu 22.04 and got some "undefined symbol: ftdi_read_data_set_chunksize" from pypinproc module wrapping import. It's been solved by compiling libftdi from sources as you mention in your cookbook :) |
Beta Was this translation helpful? Give feedback.
-
This is an updated method. I no longer compile and install libusb libftdi1-1.1. This is the new method, it's better : python venv creationenv PYTHON_CONFIGURE_OPTS='--enable-optimizations --with-lto' PYTHON_CFLAGS='-march=native -mtune=native' pyenv install --verbose 3.11.5
pyenv virtualenv 3.11.5 mpf-057
pyenv activate mpf-057
pip3 install --upgrade pip
pip3 install mpf==0.57.3 mpf-mc==0.57.1 mpf-monitor==0.57.1 Install P-ROC module:sudo apt-get install cmake build-essential pkg-config libftdi1-2 libftdi1-dev
# les repos mpf sont plus récents que les repos "preble" !
cd ~/data
git clone https://github.com/missionpinball/libpinproc
cd libpinproc
mkdir -p bin && cd bin
cmake -DBUILD_SHARED_LIBS=ON ..
for f in CMakeFiles/pinproc.dir/link.txt CMakeFiles/pinprocfw.dir/link.txt; do sed -i -r -e "s/ -lusb / -lusb-1.0 /" $f ; done
make
sudo make install
cd ../..
git clone https://github.com/missionpinball/pypinproc
cd pypinproc
sed -i -r -e "s/'libusb'/'libusb-1.0'/" setup.py
# enable your venv (I use pyenv personally)
pyenv activate mpf-057
python3 setup.py install
cd ..
echo 'SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE:="0666", GROUP="plugdev"' | sudo tee /etc/udev/rules.d/50-P-ROC.rules
echo 'SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", MODE:="0666", GROUP="plugdev"' | sudo tee /etc/udev/rules.d/51-P3-ROC.rules |
Beta Was this translation helpful? Give feedback.
-
Thank you for your message, I just posted an updated way to install it,
cleaner.
It's for Debian 12, though.
I don't recommend compiling usb & ftdi libraries.
merci !
Le lun. 16 déc. 2024 à 20:37, samuel49100 ***@***.***> a
écrit :
… Hi there, thanks *gbouthenot* for this complete installation tutorial !
Just a share if anyone has the same trouble, last week I tried to install
a P-ROC driver board on Ubuntu 22.04 and got some "undefined symbol:
*ftdi_read_data_set_chunksize*" from *pypinproc* module wrapping import.
It's been solved by compiling *libftdi* from sources as you mention in
your cookbook :)
—
Reply to this email directly, view it on GitHub
<#115 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAPMMMWAJESBCHMCSPLWPLL2F4TYHAVCNFSM6AAAAABTW3M76OVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCNJYGUZDIOA>
.
You are receiving this because you authored the thread.Message ID:
<missionpinball/missionpinball/repo-discussions/115/comments/11585248@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Hello - I am having issues getting mpf-monitor to install on a raspberry pi. Does anyone know how to get that working? It seems to have issues with PyQt6. I have mpf working and mpf-mc working. But when i try to install mpf-monitor i cant get the install to work. Also, note i have a Raspberry Pi5 and we will be using the FAST Neuron board system. Thanks, Here is what i see when i try the install: (3.9.18/envs/mpf) pinball@raspberrypi:~/mpf-git/mpf-examples/demo_man $ pip install mpf-monitor × Preparing metadata (pyproject.toml) did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. × Encountered error while generating package metadata. note: This is an issue with the package mentioned above, not pip. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This installs mpf, mpf-mc, mpf-language-server, mpf-monitor, vscode, vscode extension.
This is my cookbook to properly install MPF on debian-based linux (Debian, Ubuntu, Mint).
Benefits:
Tested on Debian 12, Linux Mint 19 & 21 on x86_64 architechiture. It does not work ARM (raspberry Pi)
PYENV INSTALL
pyenv includes venv and deals with multiple python version. MPF currently works best with python 3.9, but recent debian ship with python 3.11
PYTHON COMPILATION
MPF INSTALLATION
0.56 ENVIRONMENT
This is the version I use, it the currently stable versions.
GUI INSTALLATION
Install a lightweight GUI
Don't do that if you already have a X-server installed.
IDE INSTALLATION
MPF EXTENSION MPF FOR VSCODE
** How to use: **
Before launching
code
, you should activate your virtualenv:And color / syntax are working.
Checking that everything work
modifying demos:
Before testing
demo-man
:config.yaml
, at the top of the file, comment:Now we can test !
Media window should open. Check sound is OK (type
S
on the keyboard, thenL
, thenX
), you should see the Text UI.Also try mpf-monitor:
in another shell:
Testing mc-demo:
To test the other example "mc_demo":
Beta Was this translation helpful? Give feedback.
All reactions