在Mac OSX yosemite中从源代码安装R软件包rpy2

时间:2021-03-16 23:16:14

I'm trying to install R package rpy2 on a new iMac running OSX Yosemite 10.10.1 and having problems. I downloaded a .tar.gz file and got a non zero exit status error message when I tried to install it in R:

我正在尝试在运行OSX Yosemite 10.10.1的新iMac上安装R软件包rpy2并遇到问题。我下载了一个.tar.gz文件,并在我尝试在R中安装时收到非零退出状态错误消息:

install.packages("/Users/SarahiMac/Downloads/rpy2-2.5.4.tar.gz", repos=NULL, type="source") ERROR: cannot extract package from ‘/Users/SarahiMac/Downloads/rpy2-2.5.4.tar.gz’ Warning message: In install.packages("/Users/SarahiMac/Downloads/rpy2-2.5.4.tar.gz", : installation of package ‘/Users/SarahiMac/Downloads/rpy2-2.5.4.tar.gz’ had non-zero exit status

install.packages(“/ Users / SarahiMac / Downloads / rpy2-2.5.4.tar.gz”,repos = NULL,type =“source”)错误:无法从'/Users/SarahiMac/Downloads/rpy2-2.5中提取包.4.tar.gz'警告信息:在install.packages(“/ Users / SarahiMac / Downloads / rpy2-2.5.4.tar.gz”中,:安装包'/Users/SarahiMac/Downloads/rpy2-2.5。 4.tar.gz'具有非零退出状态

Per this post, I installed Xcode (6.1.1) and tried to install the package in the terminal as follows:

根据这篇文章,我安装了Xcode(6.1.1)并尝试在终端中安装软件包,如下所示:

R CMD INSTALL rpy2-2.5.4.tar.gz

And got following error message:

并得到以下错误消息:

ERROR: cannot extract package from ‘rpy2-2.5.4.tar.gz’

I also tried to install with R CMD INSTALL --build per one of the comments here and got the same error, and I converted the tar.gz file to a zip file and that didn't work either

我还尝试使用R CMD INSTALL安装 - 在这里的每条评论中构建并得到相同的错误,并且我将tar.gz文件转换为zip文件并且无效

Any thoughts? Apologies if I am making an obvious error - I am a novice programmer.

有什么想法吗?如果我犯了一个明显的错误,我会道歉 - 我是一名新手程序员。

1 个解决方案

#1


1  

You need to read things more carefully. rpy2 is a python package to talk to R, not an R package.

你需要更仔细地阅读。 rpy2是一个与R对话的python包,而不是R包。

Perhaps you want either rPython or rJython , available at CRAN.

也许你想要CRA提供的rPython或rJython。

#1


1  

You need to read things more carefully. rpy2 is a python package to talk to R, not an R package.

你需要更仔细地阅读。 rpy2是一个与R对话的python包,而不是R包。

Perhaps you want either rPython or rJython , available at CRAN.

也许你想要CRA提供的rPython或rJython。