This problem arises from using a different version of python to pip install source rather than the version that is owned by root and has its setuid bit set. It comes from not understanding what python -m pip install -e . does, which is to set up the dependencies for the version of python used by the source in a directory (in the example, ~/SaltSource/3006.9/salt). The solution is to install the version of python which will be used for the source, run python -m pip install -e . and THEN change the owner/group of the installed python version (in the case of the example given, ~/.pyenv/versions/3.10.15/bin/python3.10) to root and set its setuid bit. As mentioned by @dan1st, the original question did not mention the fact that the python version must run as root, so I am amending it to make this clear.