Creating a Custom Environment for Running Jupyter Notebooks

You can create custom environments that give you more control over the environment.

Important: A Jupyter Notebook used by the Python Execute operator always runs under the owner of the workspace it is contained in. This means that only environments known by that account are available to the Python Execute operator.

Create the environment from within a Jupyter Notebook.

Procedure

  • Add the following code snippet to a cell, and then run the cell.
    !conda create --clone python3 -n MyTest
    !conda install -n MyTest -y docker-py
    !conda run -n MyTest python -m ipykernel install --user --name MyTest
    

Result

A clone of the base Python 3 environment is created.

What to do next

After you create the environment and close the current Jupyter Notebook instance, the new environment is available to the current user.

For more information about managing custom environments, see https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html.

For an example that provides verbose output and a list of packages installed, see Uploading and Running the Conda Environment Example.