I wrote a code which using pyspark. It can run perfectly in terminal. But when I tried use sublime to run this code, it shows following.
'cmd' is not recognized as an internal or external command, operable program or batch file. Traceback (most recent call last): File "C:\Users\Sprout G2 Demo\Desktop\HP_Sprout\FaceMatcher-RestAPI\app.py", line 17, in <module> sc = SparkContext('local[*]', 'Face Match') File "C:\Spark\spark-2.4.1-bin-hadoop2.7\python\pyspark\context.py", line 133, in __init__ SparkContext._ensure_initialized(self, gateway=gateway, conf=conf) File "C:\Spark\spark-2.4.1-bin-hadoop2.7\python\pyspark\context.py", line 316, in _ensure_initialized SparkContext._gateway = gateway or launch_gateway(conf) File "C:\Spark\spark-2.4.1-bin-hadoop2.7\python\pyspark\java_gateway.py", line 46, in launch_gateway return _launch_gateway(conf) File "C:\Spark\spark-2.4.1-bin-hadoop2.7\python\pyspark\java_gateway.py", line 108, in _launch_gateway raise Exception("Java gateway process exited before sending its port number") Exception: Java gateway process exited before sending its port number
My OS is windows 10, using python 3 and JDK 8.