Exporting and Importing Environments

1. Build the Environment

Build a computational environment that includes the software you need by installing software using code cells as shown below. For complete documentation on this process, see How to Install System Packages.

In the example below, an environment called Color Palette is built in an article called Color Palette Extractor. The author installed two packages, pillow for image manipulation and haishoku for the image color analysis, and added some contextual information for human readers.

2. Export the Environment

2.1. Step 1: Export the Environment

  • Select the gear icon to the right of the runtime to open the runtime settings.

  • Check the box labeled Export the environment.

Export the environment

2.2. Step 2: Publish the Article

Create a URL that's representative of your article. For example, Color Palette Extractor is published at color-extractor.

3. Publish the Article

Publish the Article containing the environment by clicking the publish article button on the toolbar, choosing a name for the environment, and clicking the Publish button.

4. Importing an Environment

The environment created in Color Palette Extractor will now be available to all your other articles. This includes other articles shared by any groups you belong to.

4.1. Step 1: Create a New Runtime

Create a new runtime

4.2. Step 2: Select a New Environment

Select the gear icon to the right of the runtime to open the runtime settings and then select the Environment dropdown menu.

Open the settings for your new runtime

Scroll down to Import from another notebook....

Import environment

Type in or scroll to the name of your article, in this case color-extractor.

Select the article with the environment you want to import

Now select Color Palette from the list of available environments.

Select the environment to import

As you can see in The Hues of Turner article, all the packages available in Color Palette Extractor are immediately available in the new article - no installation required!