【问题标题】:from pyspark.streaming import StreamingContext ImportError: No module named streamingfrom pyspark.streaming import StreamingContext ImportError: No module named streaming
【发布时间】:2015-05-01 04:40:24
【问题描述】:

从 pyspark.streaming 导入 StreamingContext ImportError:没有名为流的模块

当我尝试通过 pyspark 使用流式传输时出现此错误。我成功地能够通过 scala 使用流媒体。

导入 org.apache.spark.streaming._

没有给出错误,我可以运行该程序。

我在 http://hortonworks.com/hadoop-tutorial/using-apache-spark-hdp/ 上运行 spark

【问题讨论】:

    标签: apache-spark pyspark


    【解决方案1】:

    用于 Spark Streaming 的 Python API 是最新的,它是在 1.2 版本中添加的(阅读 changelog)。检查您使用的是哪个版本?

    【讨论】:

      猜你喜欢
      • 2017-02-20
      • 2018-01-03
      • 2017-11-02
      • 2017-10-04
      • 2020-09-23
      • 2015-08-28
      • 2015-03-30
      • 2012-10-24
      • 1970-01-01
      相关资源
      最近更新 更多