I tried installing Spark on windows 10. I followed the steps in this order:
- Installed Java (outside Program Files folder in C drive)
- Validated the version of spark downloaded from Apache(
spark-3.2.0-bin-hadoop3.2.tgz
) - unzip the spark in the folder outside Program files(Installed in C drive)
- Downloaded
winutils.exe
(from GIT which is in the folderHadoop-3.2.0/bin
) and put that inc:/hadoop/bin
folder - Set the environment variables for
JAVA_HOME
(path of java),SPARK_HOME
(path of the spark installation),HADOOP_HOME
(path of winutils) - Included the
PATH
variable with%JAVA_HOME%/bin
and similarly the other 2.
When I tried running Spark -version, it gives an error Spark is not recognized as the internal or external command
. When I run spark-shell
, it gives the error SparkContext: Error initializing SparkContext / Utils: Uncaught exception in thread main / ERROR Main: Failed to initialize Spark session.
Could you please let me know if I missed any steps for successful execution? Any suggestions on how to resolve these errors while running spark?