我刚开始学习Spark和Python。我已经在Windows上安装了Python 3.5.1和Spark-1.6.0-bin-hadoop2.4。
当我在Python shell中执行sc = SparkContext("local", "Simple App")
时,出现以下错误:
>>> from pyspark import SparkConf, SparkContext
>>> sc = SparkContext("local", "Simple App")
Traceback (most recent call last):
File "<pyshell#11>", line 1, in <module>
sc = SparkContext("local", "Simple App")
File "C:\spark-1.6.0-bin-hadoop2.4\python\pyspark\context.py", line 112, in __init__
SparkContext._ensure_initialized(self, gateway=gateway)
File "C:\spark-1.6.0-bin-hadoop2.4\python\pyspark\context.py", line 245, in _ensure_initialized
SparkContext._gateway = gateway or launch_gateway()
File "C:\spark-1.6.0-bin-hadoop2.4\python\pyspark\java_gateway.py", line 79, in launch_gateway
proc = Popen(command, stdin=PIPE, env=env)
File "C:\Python35-32\lib\subprocess.py", line 950, in __init__
restore_signals, start_new_session)
File "C:\Python35-32\lib\subprocess.py", line 1220, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
>>>
sc = SparkContext("local", "Simple\ App")
吗? - Hossein Vatani