Big_Data
Big_Data

Reputation: 322

Java gateway process exited before sending the driver its port number

I am running a simple program and trying to print the output of a file using sc but when I run the program in pycharm it's giving below

The system cannot find the path specified.

But the path I have given is correct and also another exception is popping up don't know how to solve the issue

PFA

Here is the code I am trying

from pyspark import SparkConf, SparkContext
sc = SparkContext(master="local", appName="Spark_demo")
filePath = "D:\discuss\text.txt"
print(sc.textFile(filePath).first())

Upvotes: 1

Views: 1166

Answers (1)

Big_Data
Big_Data

Reputation: 322

Resolved the issue... There was an issue with pyspark setup and also its path variables.. open command prompt as administrator and check pyspark running or not if it is working then run the pycharm project.

Upvotes: 1

Related Questions