After selecting your base environment, you can use package managers to install system-level dependencies (typically via apt-get or conda) or language-specific libraries (e.g. CRAN, pip, CPAN, etc.).
Which package managers appear depends on which environment you choose. You will always have apt-get. Other managers depend on what languages are pre-installed. For instance, if you select an R environment, you'll see apt-get, CRAN, Bioconductor, and GitHub:
To add a package:
- Click the "+ Add" icon next to a package manager;
- type the name of a package, and click the checkmark.
When you click the "+ Add" icon, a version field will show up as well.
To specify a package version:
After typing in a package, either click in the version area to add a version, or press 'enter' or 'tab' to move the cursor there automatically. (You don't need to specify a version -- packages will be installed as version 'latest' by default.)
When will dependencies be installed?
The next time you run your code. The installation process is (re-)triggered each time you add new packages.
Installed dependencies are subsequently cached for future runs.
While your code is executing, the bottom Output pane will automatically open, allowing you to monitor progress and inspect the results of commands executed during the setup phase.
Once the setup run completes (or is stopped), this output will be available in a file called
buildLog in your results. See Monitoring and inspecting the result of the environment setup phase for more information.
Adding a new package manager to your environment
If you need a new package manager, you may be able to install it via apt-get. This will cause it to dynamically appear in your installation environment. For instance, if you install
python-pip via apt-get, you can subsequently install python packages via pip:
As of February 2019, the apt-get packages that will add package managers are
If you have any issues:
We're here to help! You can either write to firstname.lastname@example.org or use the live chat feature on the bottom right of your screen.
Further customization options
Code Ocean also provides a more flexible postInstall Script for dependencies not available through our native package managers.
In addition to installing packages, package managers can also install additional languages. This can enable you to run analyses that require multiple languages in sequence.