title: Why does spark-shell fail with “error: not found: value spark”?
body: <p>I use Spark 2.1.0.</p>
  
  <p>When I run <code>spark-shell</code>, I encounter this error:</p>
  
  <pre><code>&lt;console&gt;:14: error: not found: value spark
         import spark.implicits._
                ^
  &lt;console&gt;:14: error: not found: value spark
         import spark.sql
                ^
  </code></pre>
  
  <p>What could be the reason? How to fix it?</p>