Notebook Scoped Libraries
You can use notebook scoped libraries in Oracle AI Data Platform for creating custom Python environments specific to a Notebook.
Notebook scoped libraries are not cluster scoped, so they do not apply to other notebooks sharing the same cluster. Notebook scoped libraries only apply to current notebook and all workflow jobs that use the current notebook as 'Notebook tasks'.
Note:
pip-based commands are currently only supported in notebooks with *.ipynb extensions. Python files with *.py extensions are not supported and installing JAR files as notebook scoped libraries is not supported.
Supported Commands
You can use the following commands for managing your notebook scoped libraries:
Install and uninstall a package by using the package name:pip install <package>
pip uninstall <package>Install and uninstall all the libraries from a requirements.txt file:pip install -r /Workspace/path/to/requirements.txt
pip uninstall -r /Workspace/requirements.txtInstall and uninstall wheel files with *.whl extension from a workspace path:pip install /Workspace/path/to/my-package.whl
pip uninstall /Workspace/path/to/my-package.whl List the already installed notebook scoped libraries in the current notebook:pip listLimitations
You can run only one %pip command in a notebook cell. To install multiple packages, run each %pip command in a separate cell.
%pip uninstall <package> does not support the -y option or other additional options.
Installing packages from Git repositories is not supported. This includes Git-based package URLs such as git+https://....