I use pyproject.toml and it’s [project.scripts] section to define entry points.
On Debian 11 (stable) the generated scripts are placed in /usr/local/bin when I run pip via sudo or as root user. I don’t know how this location is determined.
The problem is that not in all circumstances (e.g. running via pkexec) the PATH of the root user doesn’t contain /usr/local/bin.
Can this be influenced in some way?
Or is it nearly on all GNU/Linux based systems the same directory?
In that case I can use the full path explicit.
The path is determined by sysconfig (or distutils.sysconfig, on older Python versions) in the Python standard library. Debian has their own custom patches on top of Python to change how pip installs packages.