title: Why does sbt fail with sbt.ResolveException: unresolved dependency for Spark 2.0.0 and Scala 2.9.1?
body: <p>I'm trying to run a sample scala code using spark_submit using SBT. And this is my scala code - </p>
  
  <pre><code>import scala.math.random
  
  import org.apache.spark._
  
  /** Computes an approximation to pi */
  object SparkPi {
    def main(args: Array[String]) {
      val conf = new SparkConf().setAppName("Spark Pi")
      val spark = new SparkContext(conf)
      val slices = if (args.length &gt; 0) args(0).toInt else 2
      val n = 100000 * slices 
      val count = spark.parallelize(1 to n, slices).map { i =&gt;
        val x = random * 2 - 1
        val y = random * 2 - 1
        if (x*x + y*y &lt; 1) 1 else 0
      }.reduce(_ + _)
      println("Pi is roughly " + 4.0 * count / n)
      spark.stop()
    }
  }
  </code></pre>
  
  <h2>And this is my sparksample.sbt file -</h2>
  
  <pre><code>name := "Spark Sample"
  
  version := "1.0"
  
  scalaVersion := "2.9.1"
  
  libraryDependencies += "org.apache.spark" %% "spark-core" % "2.0.0"
  </code></pre>
  
  <p>But when i run SBT and package command im getting the below error </p>
  
  <blockquote>
    <p>[error] (*:update) sbt.ResolveException: unresolved dependency:
    org.apache.spark#spark-core_2.9.1;2.0.0: not found</p>
  </blockquote>
  
  <p>My scala version is <strong>2.9.1</strong> and my spark version is <strong>2.0.0</strong>.</p>
  
  <p>I'm following the below site for running spark_submit using sbt - </p>
  
  <p><a href="https://www.supergloo.com/fieldnotes/apache-spark-cluster-part-2-deploy-a-scala-program-to-spark-cluster/" rel="nofollow noreferrer">https://www.supergloo.com/fieldnotes/apache-spark-cluster-part-2-deploy-a-scala-program-to-spark-cluster/</a></p>