错误而安装Apache SparkR包 [英] Error while installing Apache SparkR package

查看:392
本文介绍了错误而安装Apache SparkR包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到以下错误而安装的Apache sparkr 包:

  install_github(amplab-演员/ SparkR-PKG子目录=PKG)
下载GitHub的回购amplab-演员/ SparkR-PKG @主
安装SparkR
错误isNamespaceLoaded(PKG):
 尝试使用零长度变量名


解决方案

我可以通过以下操作来加载在R / RStudio的SparkR库:搜索结果
下载和安装SparkR 结果
1.下载火花1.4.0和解压/解压缩其结果
2.安装火花,然后转到你的目录/spark01.4.0/R结果
3.在一个终端运行./install-dev.sh。这将创建一个在你的目录名为lib目录的文件夹结果。

添加SparkR至R .libPaths()结果
4.在终端:

 猫>> $ HOME / .Rprofile<< EOT
    LIB_PATH< - .libPaths()
    LIB_PATH< - C(LIB_PATH,/ MyDirectory /火花1.4.0 / R / lib目录)
    .libPaths(LIB_PATH)
    RM(LIB_PATH)
    EOT


  • 负载R,然后使用库(SparkR)。

  • I am getting the following error while installing the apache sparkr package:

    install_github("amplab-extras/SparkR-pkg", subdir="pkg")
    Downloading github repo amplab-extras/SparkR-pkg@master
    Installing SparkR
    Error in isNamespaceLoaded(pkg) : 
     attempt to use zero-length variable name
    

    解决方案

    I was able to load the SparkR library in R/RStudio by doing the following:

    Download and setup SparkR
    1. Download spark-1.4.0 and untar/unzip it
    2. Install spark, then go to your directory /spark01.4.0/R
    3. In a terminal, run ./install-dev.sh. This will create a folder called "lib" in your directory

    Add SparkR to R .libPaths()
    4. In a terminal:

        cat >> $HOME/.Rprofile <<EOT
        lib_path <- .libPaths()
        lib_path <- c(lib_path,"/MyDirectory/spark-1.4.0/R/lib")
        .libPaths(lib_path)
        rm(lib_path)
        EOT
    

    1. Load R, then use library(SparkR).

    这篇关于错误而安装Apache SparkR包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆