Python subprocess FileNotFoundError
问题 I am trying to follow this blog on how to execute an R script from Python. I have the R script working fine from the command line using Rscript. Here's my Python code: import subprocess import os command = "C:\Program Files\R\R-3.4.4\bin\Rscript" path2script = os.getcwd() + "\max.R" # gives me the absolute path to the R script args = ["11", "3", "9", "42"] cmd = [command, path2script] + args x = subprocess.check_output(cmd, universal_newlines = True) Which gives me this error: