SparkSession keeps running when run the code [closed]

When I run code to create spark session, it keeps running and cannot work more. Since yesterday, it gets "stuck" running without showing an error. My code is very simple and it used to work fine, I have no idea what's the issue. Here is my code step by step;

import pyspark 
import os
os.environ ['JAVA_HOME'] = 'D:\jdk1.8'

from pyspark.sql import SparkSession

os.environ["JAVA_HOME"] = "C:/Program Files/Java/jdk1.8.0_251"
os.environ["PATH"] = os.environ["JAVA_HOME"] + "/bin:" + os.environ["PATH"]

sc = SparkSession.builder.appName('AppName').master("local[*]").getOrCreate()

Since it does not give any error, I have tried to reinstall all the packages. But still does not work..

Read more here:

Content Attribution

This content was originally published by MG23 at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: