title: Pyspark: Exception: Java gateway process exited before sending the driver its port number
body: <p>I'm trying to run pyspark on my macbook air. When i try starting it up I get the error:</p>
  
  <pre><code>Exception: Java gateway process exited before sending the driver its port number
  </code></pre>
  
  <p>when sc = SparkContext() is being called upon startup. I have tried running the following commands:</p>
  
  <pre><code>./bin/pyspark
  ./bin/spark-shell
  export PYSPARK_SUBMIT_ARGS="--master local[2] pyspark-shell"
  </code></pre>
  
  <p>with no avail. I have also looked here:</p>
  
  <p><a href="https://stackoverflow.com/questions/31825911/spark-python-java-gateway-process-exited-before-sending-the-driver-its-port">Spark + Python - Java gateway process exited before sending the driver its port number?</a> </p>
  
  <p>but the question has never been answered. Please help! Thanks.</p>