Why pyspark genereting error on windows during launch in cmd

  apache-spark, pyspark, windows

I have problem with starting pyspark in cmd on windows 10 (same error in pycharm when creating SparkSessioin), I get following error

Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 22:45:29) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
  File "C:spark-3.1.2-bin-hadoop3.2pythonpysparkshell.py", line 29, in <module>
    from pyspark.context import SparkContext
  File "C:spark-3.1.2-bin-hadoop3.2pythonpyspark__init__.py", line 53, in <module>
    from pyspark.rdd import RDD, RDDBarrier
  File "C:spark-3.1.2-bin-hadoop3.2pythonpysparkrdd.py", line 27, in <module>
    from subprocess import Popen, PIPE
  File "C:UsersadminAppDataLocalProgramsPythonPython38-32libsubprocess.py", line 1307
    hp, ht, pid, tid = _winapi. (executable, args,
SyntaxError: invalid syntax

I have pyton version 3.8.2
Spark spark-3.1.2-bin-hadoop3.2

The spark-shell works fine just python won’t start. Could this be a version problem ?

Source: Windows Questions