Read the statement by Michael Teeuw here.
Error installing MMPM
-
I get an error when installing, I am a newbie, see error below
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Mar 5 22:42:06 2025
david@raspberrypi:~ $ python3 -m pip install --upgrade mmpm
error: externally-managed-environment× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. For more information visit http://rptl.io/venvnote: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
david@raspberrypi:~ $ -
@rohredd yes, python has taken to using a virtual env to enable loading different libraries for different apps on the same system
i am not a python programmer, so i dont know how to fix this, maybe google can help
“create python virtual environment” -
I hade the same problem but i could solve it with some good old reading
https://www.raspberrypi.com/documentation/computers/os.html#python-on-raspberry-pi
I used the per-user enviroment
Use the following command to create a virtual environment in a hidden folder in the current user’s home directory:
python -m venv ~/.envRun the following command from any directory to start using the virtual environment:
source ~/.env/bin/activateYou should then see a prompt similar to the following:
(.env) $:To leave the virtual environment, run the following command from any directory:
deactivateWhen you are inside your virtual environment you can install mmpm an can also use the whole commands like mmpm version ect.
Hope this helps
-
@r0t yes, AND you need to activate the virtual environment you installed stuff in, before you use it…
like in scripts started by pm2
-
That error is actually a ‘safety feature’ of the newer Raspberry Pi OS. Since they started protecting the system Python environment, you can’t just use pip install globally anymore. The easiest way around this is to use pipx. Try running these two commands-
sudo apt install pipx
pipx install mmpmThis installs MMPM in its own little ‘bubble’ so it doesn’t mess with the rest of your Pi’s system.
