I'm trying to install Spark on my Windows desktop. Everything should work fine, but I get an error "'cmd' is not recognized as an internal or external command... "
I installed Scala, Java JDK and unzipped Spark tgz in C:\, but for some reason can't get Spark to start in cmd. Any ideas?
My colleague solved the problem. Although Java seemed to work ok (ref. picture), the Java path Spark was trying to read was incorrect with an extra \bin at the end. When that was removed, Spark started working! @gonbe, thank you so much for your efforts to help!
I was the getting the same error while executing Spark-shell in the command prompt.
I tried everything mentioned above but not able to resolve the issue.
So, at last I added "C:\Windows\System32" in 'PATH' variable of System Variable and it worked.
(I'm not Windows Spark user) The spark-shell.cmd for Windows source code expects "cmd" command is available in PATH.
https://github.com/apache/spark/blob/master/bin/spark-shell.cmd
Would you try adding the directory that contains "cmd.exe" in PATH environment variable? The directory location is shown title bar in your screenshot, and environment variable setting can be done via control panel.
I had the similar error. I fixed it after following changes:
Now it works.
Thanks guys.
Check values in JAVA_HOME and make sure it is pointing to correct value. Add %JAVA_HOME%/bin in path value. After modification close command prompt and restart it. Write spark-shell and it will run.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With