pip3, pipx, pip? An overview documentation ?

Gloster

Member
Joined
Feb 7, 2024
Messages
126
Reaction score
23
Credits
1,151
The following error I get since 24.04 :
pip3 install meson
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.

If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.

See /usr/share/doc/python3.12/README.venv for more information.

note: 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.

But most SW provider did reflect pip3 for installation e.g. meson.

It seems the SW has an equivalent problem as the HW before PCI spec 2.1.

What to do, to make no fatal errors if installation via pip is necessarry ? Is there an overview documentation of "SW-Developement-Streaming" ?
 


You can just install the package for it.
Code:
sudo apt install python3-mesonpy
And otherwise just install it as user using pip.
Code:
pip3 --user install meson
 
And where I can find the documentation for it ? To denied fatal errors, where is the documentation ?
 
It's basically telling you not to install system wide python modules with pip because those system-wide python modules are managed your your package manager but in the form of python3-[module-name] packages. So you can either do that or install those modules under your own user account and it won't complain then. This is to avoid causing problems/conflicts when a python module is already installed through a system package and then is overwritten with another version when using pip as root to have another version installed system-wide.
 
So you can either do that or install those modules under your own user account and it won't complain then.
Or you can override it at the risk of causing conflicts.
Code:
pip install package_name --break-system-packages
 
This is to avoid causing problems/conflicts when a python module is already installed through a system package and then is overwritten with another version when using pip as root to have another version installed system-wide.
That is exactly the HW problem before PCI spec 2.1 !
E.g. ports will be "overwritten" by another HW.

The HW did found an "easy way" to get no problems, a cycled pronounced indication of respective addresses, ports... of all installed HW.

With other words resources are unique for "HW-me", no one else.
 
Last edited:
Top