title: Spark-submit looking in wrong directory
body: <p>I have just installed Anaconda, Apache spark, Pyspark, Scala on a fresh Linux Mint  install (all latest versions).</p>
  
  <p>To test the install I have tried running <code>spark-submit</code> in a terminal but I get the following error:</p>
  
  <pre><code>File "/home/jessica/anaconda/bin/find_spark_home.py", line 74, in &lt;module&gt;
      print(_find_spark_home())
    File "/home/jessica/anaconda/bin/find_spark_home.py", line 56, in _find_spark_home
      module_home = os.path.dirname(find_spec("pyspark").origin)
  AttributeError: 'NoneType' object has no attribute 'origin'
  /home/jessica/anaconda/bin/spark-submit: line 27: /bin/spark-class: No such file or directory
  </code></pre>
  
  <p>I see that the command is looking in <code>/bin/</code> instead of in the (correct) <code>/usr/local/spark/bin</code>.</p>
  
  <p>My <code>$PATH</code> variable contains the following:
  <code>/usr/local/spark/bin:/home/jessica/anaconda/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin::/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games</code></p>
  
  <p>I also have an env variable called <code>$SPARK_HOME</code> that contains <code>/usr/local/spark/</code>.</p>
  
  <p>How can I tell my system to look in the right directory instead?</p>