I got this error when I was trying to run spark locally and I had installed Hadoop and winutils as well but had not downloaded Spark on my machine. I downloaded Spark and set SPARK_HOME to the location where I had downloaded Spark and it worked.