1. 程式人生 > >Exception: Java gateway process exited before sending the driver its port number

Exception: Java gateway process exited before sending the driver its port number

如圖:


開啟Spyder進行驗證(若無安裝Anaconda,用Python自帶的IDLE或其他的python編輯工具都行) 
注意setAppNamesetMaster千萬不要帶空格,否則會出現“Java gateway process exited before sending the driver its port number”的報錯。之前就因為這個一直報錯,網上查了很久都沒揪出來,偶然才發現是空格的鍋。


from pyspark import SparkConf, SparkContext
conf = SparkConf().setMaster("local[*]").setAppName("First_App"
) sc = SparkContext(conf=conf)
參考:http://blog.csdn.net/hjxinkkl/article/details/57083549?winzoom=1