【问题标题】:Installing Rpy2 on MAC在 MAC 上安装 Rpy2
【发布时间】:2013-02-18 01:34:54
【问题描述】:

我正在尝试使用 easy_install 在 OSX 上安装 Rpy2。 sudo easy_install rpy2 我收到一条错误消息:

Running rpy2-2.3.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-du_3ue/rpy2-2.3.3/egg-dist-tmp-GqSaS7 "/Library/Frameworks/R.framework/Resources/bin/R" CMD config --ldflags /Library/Frameworks/R.framework/Resources/bin/config: line 142: make: command not found /Library/Frameworks/R.framework/Resources/bin/config: line 143: make: command not found R was not built as a library 无效的子字符串`

in string

error: Setup script exited with Problem while running"/Library/Frameworks/R.framework/Resources/bin/R" CMD config --ldflags

我猜问题出在 R 上,因为它没有共享它的库。 我正在使用 Python 2.7 和 R 2.15.2 请帮忙!

【问题讨论】:

  • 可能值得检查easy_install是否安装正确,似乎make不可用:make: command not found
  • 您可能需要安装 Apple 的开发者工具(Xcode、AFAIR)。

标签: macos r easy-install rpy2


【解决方案1】:

使用 macports 安装 (https://www.macports.org)

sudo 端口安装 py27-rpy2

【讨论】:

    【解决方案2】:

    你肯定需要 XCode 命令行工具——make 命令默认不存在,而且奇怪的是,当前的 XCode 默认不安装命令行工具。转到https://developer.apple.com/downloads(它会告诉您通过使用您的 Apple ID 登录来创建一个开发者帐户 - 不用担心,它是免费的,与 App Store 开发者许可证不同)。查找您的 macOS 和 Xcode 版本的 Command Line Tools,下载并运行安装程序。

    【讨论】:

      猜你喜欢
      • 2012-05-26
      • 2018-09-10
      • 2011-04-10
      • 2014-04-29
      • 2017-11-17
      • 2011-04-23
      • 2011-09-25
      • 2018-09-29
      • 2019-02-21
      相关资源
      最近更新 更多