All Collections
User Manual
Capsule setup
Installing additional Jupyter kernels
Installing additional Jupyter kernels

Python, R, Julia, and Stata kernels on Code Ocean.

Shahar Zaks avatar
Written by Shahar Zaks
Updated over a week ago

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 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 Julia kernel: 

  • requires the Julia package IJulia  ( 

  • You could theoretically install this in any environment, but it's probably best to start with a Python 3.7 (with Conda) base image. 

  • First, add julia and jupyter  as conda packages, and then add the channel conda-forge   to Conda's list of available channels.

  • Second, in the postInstall script, run julia -e 'using Pkg; Pkg.add("IJulia"); Pkg.update();' .

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; \

 What if I need a different (or older) Kernel? 

Please write to us at or via live chat, and we'll be happy to help (and to amend this article accordingly). 

Did this answer your question?