0

I'm trying to run sparkling-water from pycham, I have install the spark and sparkling-water-2.4.13.but getting error "NameError: name 'H2OContext' is not defined".

The same code is working from cli.

from pyspark.sql import SparkSession
import h2o
from pysparkling import *
spark = SparkSession.builder.appName('H20 libariy ').getOrCreate()
hc = H2OContext.getOrCreate(spark)

# Process finished with exit code 1
tim
  • 879
  • 1
  • 8
  • 26
  • https://stackoverflow.com/questions/44349062/error-with-h20context-running-pysparkling-with-spark-2-1 can you try this – Anirban Nag 'tintinmj' Jul 27 '19 at 08:06
  • thanks for the help, i have tried but it's not working. – Dev Tanwar Jul 29 '19 at 11:23
  • You can either download official sparkling water distribution from http://h2o.ai and use ./bin/pysparkling shell script to start PySparkling or you need to ensure to pass PySparkling assembly zip to spark via --py-files. The assembly is available at py/build/dist folder of the official distribution. See here how we start PySparkling in our script https://raw.githubusercontent.com/h2oai/sparkling-water/master/bin/pysparkling – Jakub Háva Jul 29 '19 at 12:42

0 Answers0