# How to import Libraries into OCaml Jupyter?

**URL:** https://discuss.ocaml.org/t/how-to-import-libraries-into-ocaml-jupyter/14827
**Category:** Ecosystem
**Tags:** opam, jupyter
**Created:** [June 21, 2024, 9:55am UTC](https://discuss.ocaml.org/t/how-to-import-libraries-into-ocaml-jupyter/14827 "2024-06-21T09:55:55Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![divyanka](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/divyanka/32/5280_2.png) [@divyanka](https://discuss.ocaml.org/u/divyanka)
#### Post date: [June 21, 2024, 9:55am UTC](https://discuss.ocaml.org/t/how-to-import-libraries-into-ocaml-jupyter/14827/1 "2024-06-21T09:55:55Z")

</div>

I’m having some trouble trying to get libraries to run on the OCaml Jupyter Kernel.

I have followed all steps [here](https://akabe.github.io/ocaml-jupyter/).

For example, I’m trying to use the `Ounit2` library.

In a Jupyter Notebook cell, after selecting the OCaml Kernel, I do

```ocaml
#use "topfind"
#require "ounit2"
open Ounit2

(* code using ounit2 *)

```

I get error `ocaml jupyer kernel : unknown option '-init'` and the cell keeps running until it’s stopped manually and then the notebook dies.

Note that I have not made any manual changes to the kernel generated by the `ocaml-jupyter-opam-genspec` in the steps above. If I remove the line containing `-init` from the kernel spec, I get errors on the subsequent lines (`unknown option --merlin`, `unknown option --connection-file`).

The error is reproduced in an isolated environment I run using Docker.

I’m using the library versions consistent with the [required versions](https://opam.ocaml.org/packages/jupyter/).
