title: Automatically including jars to PySpark classpath
body: <p>I'm trying to automatically include jars to my PySpark classpath. Right now I can type the following command and it works:</p>
  
  <pre><code>$ pyspark --jars /path/to/my.jar
  </code></pre>
  
  <p>I'd like to have that jar included by default so that I can only type <code>pyspark</code> and also use it in IPython Notebook.</p>
  
  <p>I've read that I can include the argument by setting PYSPARK_SUBMIT_ARGS in env:</p>
  
  <pre><code>export PYSPARK_SUBMIT_ARGS="--jars /path/to/my.jar"
  </code></pre>
  
  <p>Unfortunately the above doesn't work. I get the runtime error <code>Failed to load class for data source</code>.</p>
  
  <p>Running Spark 1.3.1.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>My workaround when using IPython Notebook is the following:</p>
  
  <pre><code>$ IPYTHON_OPTS="notebook" pyspark --jars /path/to/my.jar
  </code></pre>