-1

When I run the spark's main function in jupyter python I get an error at .appName function

spark=ps.sql.SparkSession.builder\
    .master('local[4]')\
     .appName('spark-lecture')\
    .getOrCreate()
sc= spark.sparkContext

Py4JError: org.apache.spark.api.python.PythonUtils.getEncryptionEnabled does not exist in the JVM

dspencer
  • 4,297
  • 4
  • 22
  • 43

1 Answers1

0

I think you didn't import the right things. Did you try the following (taken from the docs):

from pyspark.sql import SparkSession

spark = SparkSession \
    .builder \
    .master('local[4]') \
    .appName("Python Spark SQL basic example") \
    .getOrCreate()
Gabio
  • 9,126
  • 3
  • 12
  • 32