You are getting error because yoy haven't configure Environment variables properly.
To setup environment variable either follow the notes or follow the steps below:
Variables Name: ========================= SPARK_HOME = C:\spark JAVA_HOME = C:\Program Files\Java\jdk1.8.0_71 HADOOP_HOME = C:\winutils PATH = %SPARK_HOME%\bin;%JAVA_HOME%\bin (append to the existing path) Steps to configure environment variable in windows: ====================================================== 1) Right click on Start Menu 2) Click on Control Panel 3) Click on System and Security 4) Click on System 5) Click on Advanced System Settings 6) Click on Environment Variable button 1. Add New Environment Variable 2. Variable Name: SPARK_HOME, Variable Value: C:\spark, Save the variable 3. Variable Name: JAVA_HOME, Variable Value: C:\Program Files\Java\jdk1.8.0_71 4. Variable Name: PATH, Variable Value (append to the end of the string) %SPARK_HOME%\bin;%JAVA_HOME%\bin 5. Variable Name: HADOOP_HOME, Variable Value: C:\winutils
Hope this helps.
Note: Please vote up if you like my answer.
I followed all the instructions given getting the same error.
I just discussed the problem with my trainer Prashanth..he said everything looks fine he is asked me to conctact you to look into your system.Let me know when you are ready i will share my system.
Please check your email, you should have received an email from Dezyre Tech Support.
Please reply to the email with requested details.
Thanks Abhijit for your Help.