Python PEP 668 - working with "externally managed environment"
Briefly

Python is now an 'externally managed environment' on newer Linux releases, causing frustrations for developers. Installing Python packages via apt is recommended. If non-Debian packages are needed, create a virtual environment using python3 -m venv.
To work around the 'externally managed environment' issue, use virtual environments (venv) for non-Debian packaged Python packages or applications. For non-Debian packages, consider using pipx to manage a virtual environment.
Read at Turnkeylinux
[
|
]