cwd
work only with , shell=True
, for example:
subprocess.Popen(command, cwd=path_to_work_dir, shell=True)
Because param cwd
is work dir, not path to command.
cwd: Sets the current directory before the child is executed.
Use full path or shell=True
. Don't do both