Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

spark-submit giving Invalid syntax error message on Windows 10 with Python 2.7, Java 1.8

This is a question on Spark installed as standalone in Windows 10. I have installed Spark and the related hadoop classses in my system. I am learning Spark, After I start Spark interactive shell by running in cmd "C:\Spark\bin\pyspark" it starts

Spark version 1.6.1

However I am not able to run spark-submit

The command:

C:\Spark\bin\spark-submit --class org.apache.spark.examples.SparkPi --master local \
                          C:\Spark\lib\spark-examples*.jar 10

gives

"Syntax error: Invalid Syntax"

error message. I get the same error when i try to submit any python file as well.

I have installed Java 8 and python 2.7 in my system.

Thanks

like image 261
Shekar Avatar asked Aug 06 '26 14:08

Shekar


1 Answers

You should run spark-submit in command line instead of in spark-shell or pyspark.

like image 187
mạnh đạt nguyễn Avatar answered Aug 08 '26 03:08

mạnh đạt nguyễn



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!