Install additional Jupyter kernels

Python, R, and Stata kernels on Code Ocean.

The Python 3 kernel

  • Is already included when you install Jupyter.

  • To install Jupyter, If you have Conda or pip installers available in your environment, you can just add package Jupyter .

  • If you do not, you can add python3-pip , python3-setuptools , and python3-wheel via apt-get, and then add jupyter via the pip3 installer (which will appear automatically when you've added python3-pip ).

The R kernel

  • Requires the package IRkernel: available either through CRAN, or, if you have the Conda installer available, you can add the package r-irkernel and then add the channel r to Conda's list of available channels.

  • You'll also need to run, in the postInstall script, the command Rscript -e "IRkernel::installspec()" .

The Stata kernel:

  • Start your capsule from an environment with Stata available.

  • Via the apt-get installer, add the packages python3-pip , python3-setuptools, and python3-wheel .

  • Via the pip3 installer that dynamically appears, add ipystata , pandas, and jupyter.

  • In the postInstall script, run the following:

ipython -c "import ipystata; \  from ipystata.config import config_stata; \  config_stata('/usr/local/stata/stata-mp')"

Last updated