【问题标题】:doing spark-shell with mlib, error: object jblas is not a member of package org用 mlib 做 spark-shell,错误:对象 jblas 不是包 org 的成员
【发布时间】:2015-10-27 08:51:45
【问题描述】:

在spark-shell中,当我执行import org.jblas.DoubleMatrix时,会在RHEL上抛出“error: object jblas is not a member of package org”。

实际上,我在我的 mac pro 上搜索了“jblas”并从https://gcc.gnu.org/wiki/GFortranBinaries#MacOS 安装了“gfortran”。

我的spark版本是spark-1.4.0-bin-hadoop2.6.tar或者spark-1.5.1-bin-hadoop2.6.tar,是直接从官网下载的,也就是说我没有'不要从源代码构建。

【问题讨论】:

    标签: apache-spark


    【解决方案1】:

    此步骤可能是可选的,它将在您的笔记本电脑存储库中安装 jblas jar。

    git clone https://github.com/mikiobraun/jblas.git
    cd jblas
    mvn install
    

    进入spark目录

    cd /Users/erichan/Garden/spark-1.5.1-bin-cdh4
    

    使用packages选项启动spark shell,如果你没有做第一步,你应该给jblas正确的maven坐标:

    bin/spark-shell --name my_mlib --packages org.jblas:jblas:1.2.4-SNAPSHOT --driver-memory 4G --executor-memory 4G --driver-cores 2
    

    【讨论】:

    • 你不需要安装jblas。您可以使用 --packages 选项
    • 你能补充一些为什么这应该有效的细节吗?纯代码答案不是很有用,可能会被删除。
    • 确保在 'mvn install' 之前安装了 ruby​​
    猜你喜欢
    • 1970-01-01
    • 2016-02-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-10-27
    • 2012-12-20
    • 2019-11-22
    • 1970-01-01
    相关资源
    最近更新 更多