Cannot run pyspark in Jupyter
Question: I have Windows 10 and have installed spark following the instructions from:

<https://hernandezpaul.wordpress.com/2016/01/24/apache-spark-installation-on-
windows-10/>

Now I open my jupyter notebook, and type the following:

    
    
    import os
    import sys
    
    # Path for spark source folder
    os.environ['SPARK_HOME']="c:\\Spark"
    
    # Append pyspark  to Python Path
    sys.path.append("C:\\Spark")
    sys.path.append("C:\\Spark\\python")
    sys.path.append("C:\\Spark\\python\\lib")
    sys.path.append("C:\\Spark\\python\\lib\\py4j-0.9-src.zip")
    
    from pyspark import SparkContext
    from pyspark import SparkConf
    

and seems that cannoot load the accumulators library, as I get the following
error:

    
    
    --------------------------------------------------------------------------- ImportError                               Traceback (most recent call last) <ipython-input-54-68cce399fff2> in <module>()
         12 sys.path.append("C:\\Spark\\python\\pyspark")
         13 
    ---> 14 from pyspark import SparkContext
         15 from pyspark import SparkConf
         16 
    
    C:\Spark\python\pyspark\__init__.py in <module>()
         39 
         40 from pyspark.conf import SparkConf
    ---> 41 from pyspark.context import SparkContext
         42 from pyspark.rdd import RDD
         43 from pyspark.files import SparkFiles
    
    C:\Spark\python\pyspark\context.py in <module>()
         26 from tempfile import NamedTemporaryFile
         27 
    ---> 28 from pyspark import accumulators
         29 from pyspark.accumulators import Accumulator
         30 from pyspark.broadcast import Broadcast
    
    ImportError: cannot import name accumulators
    

These is how my sys.path looks like, which I assume are the correct folders:

    
    
    ['',
     'C:\\Anaconda2\\python27.zip',
     'C:\\Anaconda2\\DLLs',
     'C:\\Anaconda2\\lib',
     'C:\\Anaconda2\\lib\\plat-win',
     'C:\\Anaconda2\\lib\\lib-tk',
     'C:\\Anaconda2',
     'c:\\anaconda2\\lib\\site-packages\\sphinx-1.3.5-py2.7.egg',
     'c:\\anaconda2\\lib\\site-packages\\setuptools-20.3-py2.7.egg',
     'C:\\Anaconda2\\lib\\site-packages',
     'C:\\Anaconda2\\lib\\site-packages\\win32',
     'C:\\Anaconda2\\lib\\site-packages\\win32\\lib',
     'C:\\Anaconda2\\lib\\site-packages\\Pythonwin',
     'C:\\Anaconda2\\lib\\site-packages\\IPython\\extensions',
     'C:\\Users\\Manuel\\.ipython',
     'C:\\Spark',
     'C:\\Spark\\python',
     'C:\\Spark\\python\\lib',
     'C:\\Spark\\python\\lib\\py4j-0.9-src.zip',
     'C:\\Spark\\python\\pyspark']
    

Any help will be much appreciated.

Thanks!


Answer: This has been resolved by installing winutils.exe as described in

[Resolving Spark 1.6.0 "java.lang.NullPointerException, not
found](https://blogs.msdn.microsoft.com/arsen/2016/02/09/resolving-
spark-1-6-0-java-lang-nullpointerexception-not-found-value-sqlcontext-error-
when-running-spark-shell-on-windows-10-64-bit/)

