title: Spark Execution Error: Python in worker has different Version
body: <p>I'm running spark in standalone mode, in Windows 8 using anaconda 3.5, ipython notebook.</p>
  
  <p>The specification, I'm trying to create the environment is the following:</p>
  
  <pre><code>import os
  import sys
  import numpy
  spark_path = "D:\spark"
  os.environ['SPARK_HOME'] = spark_path
  os.environ['HADOOP_HOME'] = spark_path
  
  
  sys.path.append(spark_path + "/bin")
  sys.path.append(spark_path + "/python")
  sys.path.append(spark_path + "/python/pyspark/")
  sys.path.append(spark_path + "/python/lib")
  sys.path.append(spark_path + "/python/lib/pyspark.zip")
  sys.path.append(spark_path + "/python/lib/py4j-0.10.4-src.zip")
  
  
  from pyspark import SparkContext
  from pyspark import SparkConf
  
  sc = SparkContext("local", "test")
  </code></pre>
  
  <p>When I'm trying to run the following code:</p>
  
  <pre><code>rdd = sc.parallelize([1,2,3])
  rdd.count() 
  </code></pre>
  
  <p>it's giving me error:</p>
  
  <blockquote>
    <p>Python in worker has different version 3.4 than that in driver 3.5,
    PySpark cannot run with different minor versions.Please check
    environment variables PYSPARK_PYTHON and PYSPARK_DRIVER_PYTHON are
    correctly set.</p>
  </blockquote>
  
  <p>I tried <a href="https://stackoverflow.com/questions/30518362/how-do-i-set-the-drivers-python-version-in-spark/36888035#36888035">this</a> </p>
  
  <pre><code>import os
  
  os.environ["SPARK_HOME"] = "/usr/local/Cellar/apache-spark/2.1.0/" ## Exact anaconda path in "program files"
  </code></pre>
  
  <p>And I tried <a href="https://stackoverflow.com/questions/38936150/spark-exception-python-in-worker-has-different-version-3-4-than-that-in-driver">this</a></p>
  
  <p>But both could not solve my problem. Can someone please help me to resolve the issue? I'm bit non-technical in terms of computer system configuration.</p>
  
  <p>Thanks a lot!</p>