Libraries and scripts for notebooks

Watson Studio includes many preinstalled libraries for Python and R:

If you use Scala, or you want to use other libraries, you can install libraries and packages.

List installed libraries

To see the list of installed libraries, run the appropriate command from a notebook cell:

  • Python: !pip list --isolated
  • R: installed.packages()

Import an installed library

To import an installed library into your notebook, run the appropriate command from a notebook cell with the library name:

  • Python: import library_name
  • R: library(library_name)

You can write script that includes multiple classes and methods and then import the script into your notebook.

Watch this video to see how to use the Apache Spark Machine Learning Library.

Figure 1. Video iconUse the Apache Spark Machine Learning library
This video shows how to use the machine learning library in a notebooks

Learn more