.. _cloud-environments:

=========================
Working with environments
=========================

To share an environment on Anaconda Cloud:

#. Save a `conda environment <http://conda.pydata.org/docs/using/envs.html>`_::

     conda env export -n my-environment -f my-environment.yml

   NOTE: Replace ``my-environment`` with the actual name of your 
   environment.

#. Upload it to Cloud either using the web interface or the ``conda env upload``
   command.

   * Using the web interface:
   
     Go to ``https://anaconda.org/USERNAME/environments``.
     
     NOTE: Replace ``USERNAME`` with your username.
     
     In the top right corner use the Upload button to upload your environment.

   * Using the ``conda env upload`` command::

       conda env upload -f my-environment.yml

     NOTE: Replace ``my-environment`` with the actual name of your 
     environment.
   
#. You can see a list of your uploaded environments at::

       http://envs.anaconda.org/USERNAME

   NOTE: Replace ``USERNAME`` with your username.

#. Anyone can download and install your environment from Cloud::

       conda env create user/my-environment
       source activate my-environment

   NOTE: Replace ``my-environment`` with the actual name of 
   your environment.
