user3279453 user3279453 - 1 year ago 134
Python Question

When I try and run pyspark.cmd I get the error message "find: 'version': No such file or directory"

I'm trying to get started with Apache Spark. I'd like to use it via python. However, when I run pyspark from the command line I get the following error message:

Running python with PYTHONPATH=C:\Programs\Apache\Spark\spark-1.2.0-bin-hadoop2.
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: and
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
\", 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", 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", 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", 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.

When I try and run the scala interface by running spark-shell I get the message:

find: 'version': No such file or directory
else was unexpected at this time.

I cant find any info on this error online, other than

which turned out to be a dead end.
Please help!

Answer Source

I had the same problem in spark 1.2.0 but not in spark 1.0.2. The reason was in my case that I had cygwin in the DOS classpath. Spark uses the find command in the file 'spark-class2.cmd', which used then the cygwin find command instead of the DOS find command, which works somewhat different. I removed cygwin from the DOS PATH, which solved the problem.

Regards, Felix

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download