Pyspark in Pycharm : Error


#1

Hi Admin,

I am able to access Pyspark in LAB and in my terminal in WINDOWS Successfully.

but when i try setting it up in Pycharm and tried to validate,it comes up with below error.

C:\Python27\python.exe C:/Users/Prithviraj/PycharmProjects/Sparkdemo/Src/main/python/Sparkdemo.py
’cmd’ is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
File “C:/Users/Prithviraj/PycharmProjects/Sparkdemo/Src/main/python/Sparkdemo.py”, line 3, in
sc=SparkContext(master=“local”,appName=“Spark Demo”)
File “C:\spark-1.6.3-bin-hadoop2.6\python\lib\pyspark.zip\pyspark\context.py”, line 112, in init
File “C:\spark-1.6.3-bin-hadoop2.6\python\lib\pyspark.zip\pyspark\context.py”, line 245, in _ensure_initialized
File “C:\spark-1.6.3-bin-hadoop2.6\python\lib\pyspark.zip\pyspark\java_gateway.py”, line 94, in launch_gateway
Exception: Java gateway process exited before sending the driver its port number

Process finished with exit code 1

i followed video"Big Data Certifications Workshop 10 - Setup Environment on Windows" and already setup environment variables and content root correctly.

Kindly advise how to fix this error.

Thanks in Advance


#2

Is this issue has been fixed for you.? Even I am getting the same error.


#3

I’m also facing the same issue ,Did u resolved this ? If so can u please tell me how to resolve this