How do I install packages in an already running Hail Dataproc cluster?

Hi!

I have already started a cluster with hailctl dataproc start ..., but I forgot to specify --pkgs on the command line! How can I install packages in this already running cluster? I have a Jupyter notebook open.

Jupyter Notebooks have a “magic” %pip that lets you install packages in the current Jupyter kernel:

%pip install matplotlib