from pyspark import SparkConf, SparkContext from pyspark.sql import SQLContext Sc = SparkContext() sqlContext = SQLContext(sc)