Setting up a default project environment (AEN 4.1.3)
====================================================

.. raw:: html

    <p>AEN includes a full installation of the Anaconda Python distribution&#8212;along
    with several additional packages&#8212;located within the root conda environment
    in <code class="docutils literal"><span class="pre">/opt/wakari/anaconda</span></code>. A copy of this environment is created for each
    new AEN Project.</p>
    <p>To configure a different set of packages than the default:</p>
    <ol class="arabic">
    <li><p class="first">Create a new conda environment in the <code class="docutils literal"><span class="pre">/opt/wakari/anaconda/envs/default</span></code> directory.</p>
    <p>EXAMPLE: Using a Python 3.4 base environment, run:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>sudo -u <span class="nv">$AEN_SRVC_ACCT</span> /opt/wakari/anaconda/bin/conda <span class="se">\</span>
        create -p /opt/wakari/anaconda/envs/default <span class="nv">python</span><span class="o">=</span><span class="m">3</span>.4
    </pre></div>
    </div>
    </li>
    <li><p class="first">Use <code class="docutils literal"><span class="pre">conda</span></code> to install any additional packages into the environment.</p>
    </li>
    <li><p class="first">After the environment is created, clone it to ensure that it works correctly:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>sudo -u <span class="nv">$AEN_SRVC_ACCT</span> /opt/wakari/anaconda/bin/conda <span class="se">\</span>
        create -p /opt/wakari/testenv --clone /opt/wakari/anaconda/envs/default
    sudo -u <span class="nv">$AEN_SRVC_ACCT</span> rm -rf /opt/wakari/testenv
    </pre></div>
    </div>
    </li>
    </ol>
    <p>The default project environment is cloned into the project workspace the first
    time the project is started.</p>
    <div class="section" id="converting-an-existing-project">
    <h2>Converting an existing project<a class="headerlink" href="#converting-an-existing-project" title="Permalink to this headline">¶</a></h2>
    <ol class="arabic">
    <li><p class="first">Run the following command to clone the environment:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>sudo -u <span class="nv">$AEN_SRVC_ACCT</span> /opt/wakari/anaconda/bin/conda <span class="se">\</span>
        create -n /projects/owner/project/envs/&lt;ENV_NAME&gt; <span class="se">\</span>
        --clone /opt/wakari/anaconda/envs/default
    </pre></div>
    </div>
    <p>NOTE: Replace <code class="docutils literal"><span class="pre">/projects/owner/project/envs/&lt;ENV_NAME&gt;</span></code> with the path to
    the new environment you would like to create within the project.</p>
    </li>
    <li><p class="first">Open the <a class="reference internal" href="../../../user-guide/basic-tasks/apps/use-crc.html"><span class="doc">Compute Resource Configuration application</span></a> for your project and set the project environment path there as well.</p>
    </li>
    </ol>
    </div>
