1

My code which I am running in Jupyter Notebook:

import pyspark
from pyspark import SparkContext
from pyspark.sql import SQLContext
from pyspark.sql import SparkSession
from pyspark.sql.types import Row
from datetime import datetime
sc = SparkContext()
spark = SparkSession(sc)
simple_data = sc.parallelize ([1,2,3])     
simple_data.count()

Error which is received:

IllegalArgumentException: 'Unsupported class file major version 56'
Yash
  • 3,438
  • 2
  • 17
  • 33
Max
  • 11
  • 1
  • 4
    Possible duplicate of [Pyspark error - Unsupported class file major version 55](https://stackoverflow.com/questions/53583199/pyspark-error-unsupported-class-file-major-version-55) – pault Aug 16 '19 at 17:46
  • 1
    To fix this issue I edited the bash_profile to ensure java 1.8 is used as the global default as follows: touch ~/.bash_profile; open ~/.bash_profile Adding export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) and saving within text edit. This does not work – Max Aug 16 '19 at 19:11

0 Answers0