sh: Rscript: 找不到命令

sh: Rscript: command not found

PyDev 中的 Python 脚本调用时,

Rscript 不起作用。

这里是有罪代码:

os.system("Rscript --vanilla test.R")

错误:

sh: Rscript: command not found

在 mac 上,命令只是 system:

> system("Rscript --vanilla test.R")
[1] " Your Name is    and  you are     years old"

(我的 test.R(在我的工作目录中)是先前问题留下的。)Rscript 应该在 "regular" 安装期间从 "usual" 中的 CRAN dmg 安装地方,就像你的和我的一样。