I am writing a GTK gui in Python and I have this line
subprocess.run("pkexec (some command)", shell=True)
which I have attached to a button in my GUI, but when I try to use the button I get this error
/bin/sh:1:pkexec:not found
The GUI relies on pkexec since it calls a command that normally requires sudo. Is there any way to get this to work?