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 subpr
Solution 1:
check that you have a right path for command and script
print(os.path.exists(command))
print(os.path.exists(path2script))
note that writing path with backslashes may be dangerous as you can create escape sequence that way which will be interpreted in different way. You can write windows paths with forward slashes and then call os.path.normpath on them, turning them into safe form (also in command you can use forward slashes only, Python interpret doesn't really care. In path to your R script that would be probably problem though)
Post a Comment for "Python Subprocess Filenotfounderror"