It should be the issue with your System Variables path. As what have mention in the error message, your command prompt can't recognize 'cmd'. So, you should add the directory contain cmd.exe into PATH list under your System variables so that your command prompt know where to find 'cmd'.
Steps
- Open Control Panel > System.
- Click on "Advanced system settings" (Right side under Related settings).
- Click on "Environment Variables..." at the bottom.
- Under "System variables" section look for "Path" and click on it, then click "Edit" button at the bottom. System variable setting
- In the editing tab, add "C:\Windows\System32" or "%SystemRoot%\System32".
After you added the new Path into System variable,
- Open Command Prompt
cd %SPARK_HOME%\bin
or cd
to the spark directory.
spark-shell
If everythings done right, you should be able to see the screen below.
spark-shell
If still not working, you should check whether you have added SPARK_HOME, HADOOP_HOME, JAVA_HOME correctly under your User variables.