title: Snapcraft a conda environment
body: <p>I have a project that uses a <a href="https://docs.conda.io/en/latest/miniconda.html" rel="nofollow noreferrer">conda</a> environment for dependencies management. For now, the user can activate the environment and use it (it's exposed to the command line through an <a href="https://setuptools.pypa.io/en/latest/userguide/entry_point.html" rel="nofollow noreferrer">entry_point</a>). Right now, the &quot;installing&quot; process is (and <code>myscript</code> is the main executable):</p>
  <pre class="lang-shell prettyprint-override"><code>$ conda env create -f environment.yml
  $ conda activate MyProgram
  (MyProgram) $ myscript
  </code></pre>
  <p>So far, so good. Now I want to create a snap to distribute my program. I know I could use the <a href="https://snapcraft.io/docs/the-conda-plugin" rel="nofollow noreferrer">conda snap plugin</a>. And, indeed, I defined the command accordingly in my <code>snapcraft.yaml</code>. However, I don't know how to tell snapcraft to <em>activate</em> the environment, so <code>snapcraft</code> says:</p>
  <pre class="lang-none prettyprint-override"><code>Failed to generate snap metadata: 
  The specified command 'myscript' defined in the app 'myscript' does not exist.
  Ensure that 'myscript' is installed with the correct path.
  </code></pre>
  <p>Of course, that command only exists when the environment is activated. How can I fix that?</p>