title: python not found error in pyspark shell on windows 10
body: <p>I am trying to install pyspark on windows 10. When I try to create a data frame I was getting error message and the error message is as follow:</p>
  <pre><code>   Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings &gt; Manage App Execution Aliases.
  21/07/21 21:53:00 WARN ProcfsMetricsGetter: Exception when trying to compute pagesize, as a result reporting of ProcessTree metrics is stopped
  21/07/21 21:53:07 ERROR Executor: Exception in task 0.0 in stage 0.0 (TID 0)
  org.apache.spark.SparkException: Python worker failed to connect back.
          at org.apache.spark.api.python.PythonWorkerFactory.createSimpleWorker(PythonWorkerFactory.scala:182)
          at org.apache.spark.api.python.PythonWorkerFactory.create(PythonWorkerFactory.scala:107)
          at org.apache.spark.SparkEnv.createPythonWorker(SparkEnv.scala:119)
          at org.apache.spark.api.python.BasePythonRunner.compute(PythonRunner.scala:145)
          at org.apache.spark.api.python.PythonRDD.compute(PythonRDD.scala:65)
          at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:373)
          at org.apache.spark.rdd.RDD.iterator(RDD.scala:337)
          at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
          at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:373)
          at org.apache.spark.rdd.RDD.iterator(RDD.scala:337)
          at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
          at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:373)
          at org.apache.spark.rdd.RDD.iterator(RDD.scala:337)
          at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
          at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:373)
          at org.apache.spark.rdd.RDD.iterator(RDD.scala:337)
          at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
          at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:373)
          at org.apache.spark.rdd.RDD.iterator(RDD.scala:337)
          at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
          at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:373)
          at org.apache.spark.rdd.RDD.iterator(RDD.scala:337)
          at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
          at org.apache.spark.scheduler.Task.run(Task.scala:131)
          at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:497)
          at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1439)
          at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:500)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at java.lang.Thread.run(Thread.java:748)
  Caused by: java.net.SocketTimeoutException: Accept timed out
          at java.net.DualStackPlainSocketImpl.waitForNewConnection(Native Method)
          at java.net.DualStackPlainSocketImpl.socketAccept(DualStackPlainSocketImpl.java:131)
          at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:535)
          at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:189)
          at java.net.ServerSocket.implAccept(ServerSocket.java:545)
          at java.net.ServerSocket.accept(ServerSocket.java:513)
          at org.apache.spark.api.python.PythonWorkerFactory.createSimpleWorker(PythonWorkerFactory.scala:174)
          ... 29 more
  </code></pre>
  <p>I am using the following versions to install :</p>
  <pre><code>python - 3.9
  java -1.8
  pyspark - 3.1.2
  </code></pre>
  <p>I have my <code>SPARK_HOME</code> as <code>C:\spark\spark-3.1.2-bin-hadoop3.2</code></p>