title: Spark context 'sc' not defined
body: <p>I am new to Spark and I am trying to install the PySpark by referring to the below site.</p>
  
  <p><a href="http://ramhiser.com/2015/02/01/configuring-ipython-notebook-support-for-pyspark/" rel="noreferrer">http://ramhiser.com/2015/02/01/configuring-ipython-notebook-support-for-pyspark/</a></p>
  
  <p>I tried to install both prebuilt package and also by building the Spark package thru SBT.</p>
  
  <p>When I try to run a python code in IPython Notebook I get the below error.</p>
  
  <pre><code>    NameError                                 Traceback (most recent call last)
     &lt;ipython-input-1-f7aa330f6984&gt; in &lt;module&gt;()
        1 # Check that Spark is working
  ----&gt; 2 largeRange = sc.parallelize(xrange(100000))
        3 reduceTest = largeRange.reduce(lambda a, b: a + b)
        4 filterReduceTest = largeRange.filter(lambda x: x % 7 == 0).sum()
        5 
  
        NameError: name 'sc' is not defined
  </code></pre>
  
  <p>In the command window I can see the below error.</p>
  
  <pre><code>&lt;strong&gt;Failed to find Spark assembly JAR.&lt;/strong&gt;
  &lt;strong&gt;You need to build Spark before running this program.&lt;/strong&gt;
  </code></pre>
  
  <p>Note that I got a scala prompt when I executed <em>spark-shell</em> command</p>
  
  <p><strong>Update:</strong></p>
  
  <p>With help of a friend I am able to fix the issue related to Spark assembly JAR by correcting the contents of .ipython/profile_pyspark/startup/00-pyspark-setup.py file </p>
  
  <p>I have now only the problem of Spark Context variable. Changing the title to be appropriately reflect my current issue.</p>