How do I install packages in notebooks?

To install packages in notebooks, you need to first consider which language you are using in your notebook, Python3 or R. For Python, you can install packages via pip through notebook cells by specifying a "!" before the pip call. So for example “!pip install statsmodels” would be a standard way of installing statsmodels. For R, you can install packages using install.packages (“package_name") and this would be the standard way of installing. After the installation is complete, you need to restart your kernel to be able to use the package.

Was this article helpful?

4 out of 4 found this helpful

Have more questions? Submit a request