Jupyter Notebook Application (AEN 4.0)
======================================

.. raw:: html

    <p>The Jupyter Notebook Application allows the creation and editing of
    documents that display the input and output of a Python or R language script.
    Once saved, these files may easily be shared with others.</p>
    <p>NOTE: Python and R language are included by default, and with customization the
    notebooks can run many other kernel/languages.</p>
    <p>Anaconda Enterprise Notebooks 4.0 uses Jupyter notebook, 4.2,
    plus some extensions to make them even more useful including one-click
    integration with Anaconda Cloud and easy management of conda environments
    and packages.</p>
    <p>This page includes a brief introduction to Jupyter Notebooks and information
    on using the notebook extensions.</p>
    <p><strong>Official Jupyter Notebook user instructions</strong> are located in the <a class="reference external" href="http://jupyter.readthedocs.org/en/latest/">Jupyter documentation</a>.</p>
    <p><img alt="image1" src="../../../_images/ae-notebooks/4.0/user/finding_ipython.png" /></p>
    <p>To open the Jupyter Notebook application, from your user home page, select the project you want to manage. On the project&#8217;s home page, click the Jupyter Notebooks icon.</p>
    <p>This brings you to the Jupyter Notebooks Files tab:</p>
    <p><img alt="image0" src="../../../_images/ae-notebooks/4.0/user/jupyter_main.png" /></p>
    <p>TIP: You can see and manage the same file list in the Terminal, Workbench, and Viewer apps.</p>
    <ul class="simple">
    <li><strong>Test a sample notebook</strong>. The examples folder contains several types of notebook examples in Python and one in R language. Open any example notebook to play with it and see how it works.</li>
    <li><strong>Create a new notebook</strong>. From the Files tab, create a new notebook by clicking the top right New button, then select Python [Default], Python [root] or R language.</li>
    </ul>
    <p>TIP: By default, your new Jupyter Notebook is saved in the project directory, not
    your home directory.</p>
    <div class="section" id="notebook-extensions">
    <h2>Notebook Extensions<a class="headerlink" href="#notebook-extensions" title="Permalink to this headline">¶</a></h2>
    <p>Extensions included in Anaconda Enterprise Jupyter Notebooks include:</p>
    <ul class="simple">
    <li><strong>Synchronize Environments</strong> with Jupyter from top Kernel menu</li>
    <li><strong>Locking</strong> multi-user capability from top menu Lock button</li>
    <li><strong>Revision Control Mechanism (RCM)</strong> adds top menu buttons Status, Checkout and Commit</li>
    <li><strong>Conda</strong> environment and package management tab</li>
    <li><strong>Conda notebook</strong> conda management inside notebook from Kernel - Conda Packages menu</li>
    <li><strong>Anaconda Cloud</strong> integration from top menu Publish to cloud button</li>
    </ul>
    <div class="section" id="synchronize-environments">
    <h3>Synchronize environments<a class="headerlink" href="#synchronize-environments" title="Permalink to this headline">¶</a></h3>
    <p>You can change Python and R-language environments inside a unique notebook session without the need to start up several instances using each of your selected environments. To change environments, from the top menu bar, select Kernel, then Change kernel, and select Python [default] or R [default].</p>
    <p><img alt="image6" src="../../../_images/ae-notebooks/4.0/user/extensions_kernels.png" /></p>
    <p>NOTE: In Anaconda Enterprise Notebooks 4.0, the default kernel for projects is <code class="docutils literal"><span class="pre">default</span></code>. In earlier versions, the default kernel for projects was root Python. This is why you see Python [Root] in the Kernel menu.</p>
    <p>TIP: You must have the R language package installed in your environment before you can switch to it.</p>
    </div>
    <div class="section" id="locking">
    <h3>Locking<a class="headerlink" href="#locking" title="Permalink to this headline">¶</a></h3>
    <p>The multi-user capability in the Anaconda Enterprise Notebooks Enterprise experience is engaged when multiple users work in the same notebook file. The notebook is &#8220;locked&#8221; on opening. If other users later open and try to save the notebook with their own changes, their save capability will be disabled, and they can not overwrite the locked notebook. To override this, they must actively take the lock by clicking the &#8220;lock&#8221; icon in the notebook toolbar:</p>
    <p><img alt="image7" src="../../../_images/ae-notebooks/4.0/user/extensions_locker.png" /></p>
    <p>NOTE: This is a &#8220;soft locking model&#8221; so a team member can choose to override a lock to save their work. If you have given team members write access to your files, they should unlock your file only to perform only meaningful (non-destructive) team contributions.</p>
    </div>
    </div>
    <div class="section" id="revision-control-mechanism-rcm">
    <span id="revision-control-mechanism"></span><h2>Revision Control Mechanism (RCM)<a class="headerlink" href="#revision-control-mechanism-rcm" title="Permalink to this headline">¶</a></h2>
    <p>The RCM Notebook Extension is simple version control for Jupyter notebook files. It is a notebook extension that uses the internal Jupyter machinery to perform its tasks.</p>
    <p>On the surface it is a simple &#8220;linear&#8221; model, but under the hood is a more complex git-based branched model. It is a model with &#8220;the latest wins&#8221; as its main &#8220;merging&#8221; strategy, so by design there are no merge conflicts.</p>
    <p>The RCM Notebook Extension adds 3 buttons:</p>
    <p><img alt="image8" src="../../../_images/ae-notebooks/4.0/user/extensions_rcm.png" /></p>
    <ul class="simple">
    <li><strong>Status button</strong>: See what revision you are on.</li>
    <li><strong>Checkout button</strong>: View a list of the previous revision points, check out a previous revision or compare differences between revisions.</li>
    <li><strong>Commit button</strong>: Commit the current changes.</li>
    </ul>
    <p><img alt="image9" src="../../../_images/ae-notebooks/4.0/user/extensions_rcm_status.png" /></p>
    <p>TIP: If you do not see the RCM buttons, please see &#8220;First time setting up RCM&#8221; below.</p>
    <ul class="simple">
    <li>STATUS: After clicking the Status button, the following window appears:</li>
    </ul>
    <p><img alt="image9" src="../../../_images/ae-notebooks/4.0/user/extensions_rcm_status.png" /></p>
    <ul class="simple">
    <li><strong>CHECKOUT</strong>: After clicking the Checkout button, the following window appears:</li>
    </ul>
    <p><img alt="image10" src="../../../_images/ae-notebooks/4.0/user/extensions_rcm_checkout.png" /></p>
    <blockquote>
    <div><ul class="simple">
    <li><strong>Checkout a previous revision point</strong>. Check the checkbox of the
    desired revision point and press the &#8220;OK&#8221; button. This will open
    a copy of the notebook at the selected revision point. If you have
    not saved your current window, checking out a previous revision
    will destroy it. If in doubt, click Cancel, save your work, then
    revert to a previous revision point.</li>
    <li><strong>Make a diff comparison</strong>. Compare two previous revision points
    by checking the checkboxes and clicking the &#8220;View Diff&#8221; button.</li>
    <li><strong>Cancel</strong> to close the current modal window.</li>
    </ul>
    </div></blockquote>
    <ul class="simple">
    <li>COMMIT: Save or persist the changes. This keeps a permanent record of
    the changes introduced so you don&#8217;t have to worry about losing data
    or information. You can &#8220;roll back&#8221; at any time by checking out a
    previous version you have committed. After clicking the Commit button,
    the following window appears:</li>
    </ul>
    <p><img alt="image11" src="../../../_images/ae-notebooks/4.0/user/extensions_rcm_commit.png" /></p>
    <p>Enter a description of this commit to remind you if you need to revert
    back to it later. Click the OK button when finished.</p>
    <p><strong>First time setting up RCM</strong></p>
    <p>If you do not see the RCM buttons in your notebook, go to the project home page and open the Terminal app.</p>
    <p>In the terminal run these commands:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">config</span> <span class="o">--</span><span class="k">global</span> <span class="n">user</span><span class="o">.</span><span class="n">email</span> <span class="s2">&quot;you@example.com&quot;</span>
    <span class="n">git</span> <span class="n">config</span> <span class="o">--</span><span class="k">global</span> <span class="n">user</span><span class="o">.</span><span class="n">name</span> <span class="s2">&quot;Your Name&quot;</span>
    </pre></div>
    </div>
    <p>NOTE: Change &#8220;<a class="reference external" href="mailto:you&#37;&#52;&#48;example&#46;com">you<span>&#64;</span>example<span>&#46;</span>com</a>&#8221; to your email address, and &#8220;Your Name&#8221; to your actual name.</p>
    <p>Now open Jupyter Notebook again and refresh, and you will see the RCM buttons.</p>
    </div>
    <div class="section" id="conda-integration">
    <h2>Conda integration<a class="headerlink" href="#conda-integration" title="Permalink to this headline">¶</a></h2>
    <p>The NBConda extension adds a Conda tab to the notebook for easy
    environment and package management from within the notebook:</p>
    <p><img alt="image12" src="../../../_images/ae-notebooks/4.0/user/extensions_conda.png" /></p>
    <p>Click the Conda tab in a notebook to display:</p>
    <ul class="simple">
    <li><strong>Conda environments list</strong>. Also export, clone or delete an environment
    in the action column, or create a new environment by clicking the &#8220;+&#8221; icon.
    Switch to an environment by clicking it; packages for that
    environment are displayed below in the installed packages list.</li>
    <li><strong>Conda available packages list</strong> for the selected environment
    in currently configured channels, search for packages and click a package
    name to install it.</li>
    <li><strong>Installed packages list</strong> in the selected environment, check for updates, update
    or delete selected packages.</li>
    </ul>
    <p>TIP: While you are in any notebook, you can jump to this same conda extension for
    the current environment by selecting Kernel -&gt; Conda Packages:</p>
    <p><img alt="image13" src="../../../_images/ae-notebooks/4.0/user/extensions_anacondacloud.png" /></p>
    <div class="section" id="conda-in-notebook-view">
    <h3>Conda in Notebook view<a class="headerlink" href="#conda-in-notebook-view" title="Permalink to this headline">¶</a></h3>
    <p>This extension adds a Conda Packages item to the Kernel menu. Selecting
    this item displays the list of Conda packages in the environment
    associated with the running kernel, and the list of available packages.
    You can perform the same actions as in the Conda tab, but only against
    the current environment.</p>
    </div>
    </div>
    <div class="section" id="anaconda-cloud-integration">
    <h2>Anaconda Cloud integration<a class="headerlink" href="#anaconda-cloud-integration" title="Permalink to this headline">¶</a></h2>
    <p>You can now easily upload your notebook to Anaconda Cloud with a simple
    button at the notebook UI:</p>
    <p><img alt="image13" src="../../../_images/ae-notebooks/4.0/user/extensions_anacondacloud.png" /></p>
    </div>
