Use the world of Python from the comfort of Scala!
Scala Shell
Switch branches/tags
Nothing to show
Clone or download

Use the world of Python from the comfort of Scala!

ScalaPy allows you to use Python libraries from your Scala code through interfaces and conversions built on top of Jep.

Getting Started

ScalaPy is published to Maven Central, so you can add it by including it in your dependencies.

libraryDependencies += "me.shadaj" %% "scalapy" % "0.2.0"

To run ScalaPy apps through SBT, you will need to configure forking as well as Java options to include the Jep native libraries.

To enable forking:

fork in run := true

To add the Jep native libraries (after installing with pip install jep):

javaOptions += "-Djava.library.path=/usr/local/lib/python3.6/site-packages/jep"

To get started with working with ScalaPy, check out the blog post introducing it.


First, build Jep and place your and libjep.jnilib files in the lib/ folder (you will probably have to create this) for SBT to pick them up. If you do not have a libjep.jnilib file, copy the file and rename it to libjep.jnilib. These files will need to be included in the same manner for building any project that depends on ScalaPy.

When you are running, you may need to provide a path to your libraries when launching SBT by using a command such as sbt -Djava.library.path=/your/path/to/lib/.

Static Facades


Logo based on with modifications to use the Python color palette.