title: Add Jar to standalone pyspark
body: <p>I'm launching a pyspark program:</p>
  
  <pre><code>$ export SPARK_HOME=
  $ export PYTHONPATH=$SPARK_HOME/python:$SPARK_HOME/python/lib/py4j-0.9-src.zip
  $ python
  </code></pre>
  
  <p>And the py code:</p>
  
  <pre><code>from pyspark import SparkContext, SparkConf
  
  SparkConf().setAppName("Example").setMaster("local[2]")
  sc = SparkContext(conf=conf)
  </code></pre>
  
  <p>How do I add jar dependencies such as the Databricks csv jar? Using the command line, I can add the package like this:</p>
  
  <pre><code>$ pyspark/spark-submit --packages com.databricks:spark-csv_2.10:1.3.0 
  </code></pre>
  
  <p><strong>But I'm not using any of these. The program is part of a larger workflow that is not using spark-submit</strong> I should be able to run my ./foo.py program and it should just work. </p>
  
  <ul>
  <li>I know you can set the spark properties for extraClassPath but you have to copy JAR files to each node? </li>
  <li>Tried conf.set("spark.jars", "jar1,jar2") that didn't work too with a py4j CNF exception</li>
  </ul>