If you do not want to modify the os.environ for the current process then the os.environ.copy() is better to use below is the code for the same:-
import subprocess, os
my_env = os.environ.copy()
my_env["PATH"] = "/usr/sbin:/sbin:" + my_env["PATH"] subprocess.Popen(my_command, env=my_env)
To know more about this you can have a look at the following video:-