Question: I want to organize my Scala packages and love how Python solves this issue with `pip`.

**Can you recommend a similar tool for the management of Scala packages?**

**EDIT:** 
I am looking for an easy installation of new packages with all it's dependencies like

```
 >>> pip install <a_package> # installs a_package with all dependencies.

```

Answer: 
The most directly similar is probably [Scala Build Tool](http://www.scala-sbt.org/). Specifically, [Library Dependencies](http://www.scala-sbt.org/release/docs/Getting-Started/Library-Dependencies.html). The Java ecosystem includes many libraries and build tools, Scala is built on Java. So you gain the ability to leverage things like -

* [Maven](http://maven.apache.org/)
* [Gradle](http://www.gradle.org/)
* [Scala Build Tool](http://www.scala-sbt.org/)

Further, because everything is run inside a virtual machine; there is no "system" level install. You can start with your [CLASSPATH](http://www.scalaclass.com/node/10) and for more investigate [class loading](http://www.developer.com/java/other/article.php/2248831/Java-Class-Loading-The-Basics.htm).

```
#!/bin/sh
# From http://www.scalaclass.com/node/10 - CLASSPATH
L=`dirname $0`/../lib
cp=`echo $L/*.jar|sed 's/ /:/g'`
exec scala -classpath "$cp" "$0" "$@"
!#
import com.my.Goodness
val goodness = new Goodness
world.hello

```
Pythonistas install system wide packages which are then used by all of the python projects. This lead to a bunch of problems which [virtualenv](https://pypi.python.org/pypi/virtualenv) tries to solve. Scala guys and in general Java people have per-project definition which is written for dependency management tool -- either mvn (xml), sbt (scala), gradle (groovy), etc. 

Most of these tools have system-wide cache, so usually it downloads some version of dependency only once, then puts it in a particular place on your disk. When you need to run/assemble your java or scala program it constructs so called CLASSPATH variable which is consists of patches to required libraries. Then CLASSPATH variable (aka PYTHONPATH in python world) is used by runtime environment to lookup required parts. Again, CLASSPATH varies a lot from project to project, whereas PYTHONPATH is quite constant. I do believe there are might be tools that do the very same job pip does, but it isn't accepted way in JVM world.