3

I tried to installed SPARK in my windows 10 (64) and set environment variables for: SPARK_HOME, HADOOP_HOME and JAVA_HOME, yet, when I try to run a python programlike this:

    *'''spark-submit SparkRuming.py'''*

I tried to change my environment variables to may possible places, but I'm still getting this:

    *'''Exception in thread "main" java.io.IOException: Cannot run program "python3": CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
        at org.apache.spark.deploy.PythonRunner$.main(PythonRunner.scala:97)
        at org.apache.spark.deploy.PythonRunner.main(PythonRunner.scala)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
        at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:951)
        at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:180)
        at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:203)
        at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:90)
        at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1030)
        at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1039)
        at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:444)
        at java.lang.ProcessImpl.start(ProcessImpl.java:140)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
        ... 14 more'''*

I'm sure I'm missing some environment variables or I'm pointing at the wrong place, does anybody have the same issue?

Krizalyd
  • 39
  • 1
  • 3
  • 1
    Can you run `python` in a normal command prompt window? – Sumner Evans Mar 18 '21 at 05:47
  • 1
    Hi, yes, I'm even using jupyter notebook as well... I think I'm messing with the environment variables, but I'm still trying to figure it out in case is something silly. – Krizalyd Mar 19 '21 at 06:38
  • I faced this too and this [**answer**](https://stackoverflow.com/a/65010346/9531589) resolved mine. – DM-techie Apr 26 '21 at 19:57

0 Answers0