我试图开始使用Apache Spark。我想通过python使用它。但是,当我从命令行运行pyspark时,我收到以下错误消息:
C:\Programs\Apache\Spark\spark-1.2.0-bin-hadoop2.4\bin>pyspark.cmd
Running python with PYTHONPATH=C:\Programs\Apache\Spark\spark-1.2.0-bin-hadoop2.
4\bin\..\python\lib\py4j-0.8.2.1-src.zip;C:\Programs\Apache\Spark\spark-1.2.0-bi
n-hadoop2.4\bin\..\python;
Python 2.7.8 |Anaconda 2.1.0 (32-bit)| (default, Jul 2 2014, 15:13:35) [MSC v.1
500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://binstar.org
find: 'version': No such file or directory
else was unexpected at this time.
Traceback (most recent call last):
File "C:\Programs\Apache\Spark\spark-1.2.0-bin-hadoop2.4\bin\..\python\pyspark
\shell.py", line 45, in <module>
sc = SparkContext(appName="PySparkShell", pyFiles=add_files)
File "C:\Programs\Apache\Spark\spark-1.2.0-bin-hadoop2.4\python\pyspark\contex
t.py", line 102, in __init__
SparkContext._ensure_initialized(self, gateway=gateway)
File "C:\Programs\Apache\Spark\spark-1.2.0-bin-hadoop2.4\python\pyspark\contex
t.py", line 211, in _ensure_initialized
SparkContext._gateway = gateway or launch_gateway()
File "C:\Programs\Apache\Spark\spark-1.2.0-bin-hadoop2.4\python\pyspark\java_g
ateway.py", line 73, in launch_gateway
raise Exception(error_msg)
Exception: Launching GatewayServer failed with exit code 255!
Warning: Expected GatewayServer to output a port, but found no output.
当我尝试通过运行spark-shell运行scala接口时,我收到消息:
find: 'version': No such file or directory
else was unexpected at this time.
除了
之外,我无法在线找到有关此错误的任何信息 结果证明是死路一条。 https://issues.apache.org/jira/browse/SPARK-3808 请帮忙!答案 0 :(得分:4)
我在spark 1.2.0中遇到了同样的问题,但在spark 1.0.2中却没有。 原因是在我的情况下我在DOS类路径中有cygwin。 Spark使用文件&#39; spark-class2.cmd&#39;中的find命令,然后使用cygwin find命令而不是DOS find命令,这有点不同。 我从DOS PATH中删除了cygwin,解决了这个问题。
问候,菲利克斯