Skip to main content
All CollectionsGetting StartedThe computational environment
Setting up new or additional languages on Code Ocean via the package managers
Setting up new or additional languages on Code Ocean via the package managers

How to use the package management system and postInstall script to install languages, interpreters, and compilers.

Updated over a week ago

Code Ocean offers many base environments with different languages pre-installed. You can also use the environment & configuration options to install multiple languages in one compute capsule. Available package managers will suffice for many common languages; less common languages will likely require a postInstall script.

Which environment should I start with?

If you:

  • are not using a pre-installed language, use a base Ubuntu (18.04 or 16.04) environment;

  • need proprietary software, such as MATLAB or Stata, start from an environment with proprietary language;

  • use a GPU, select an environment with GPU access (these will be explicitly labeled as such, or will reference CUDA or a deep learning framework);

  • need general flexibility, start from an image with Conda these will have Python as well).

Installing a language using package managers:

The following are all available as apt-get packages:

  • build-essential for the C/C++ toolchain (gcc/g++, make, etc.);

  • r-base for R (note: r-base-dev will help you install R packages, and we also recommend adding a MRAN snapshot for R 3.4.4, which is what is available via apt-get as of this writing);

  • octave  for Octave;

  • python-pip  for Python 2 and the pip installer;

  • python3-pip  for Python 3 and the pip3 installer;

  • perl for Perl (add cpanm if needed);

  • luajit for Lua (add luarocks if needed);

  • default-jdk for Java;

  • gfortran for Fortran. 

Once you add R or python, the commands Rscript or python will become available, respectively.

 Installing langauges through Conda

If your base image has a conda installer, or if you add it via postInstall script, you can add languages and language-specific packages via supplemental conda channels.

  • python is available by default (you can add python  as a package, however, and specify the version (e.g. 2.7.15  to install a different python version);

  •  julia and lua are available through conda-forge;

  •  r is available from channel r.

Installing languages via the postInstall script:

What if I need proprietary software that isn't currently supported?

Contact us at support@codeocean.com and we will be happy to look into it.

Did this answer your question?