Installing Anaconda and OpenEye Python Toolkits
================================================================================

1. Install Anaconda from https://www.anaconda.com/download Please select the Python 3x version.

.. warning::

   If your Windows user name contains a space Anaconda will prompt with a warning. Continuing with installation **will** cause issues. Installation into C:\\Anaconda3 should work satisfactorily.

..  note::

    While Anaconda is available free of charge for personal use, users may need to purchase an Anaconda license if
    they are doing commercial development.
    Please check the `Anaconda license terms <https://www.anaconda.com/anaconda-commercial-edition>`_.xs

2. Launch the *Anaconda Navigator* application and navigate to the :ref:`figure_anaconda_environments` tab.

.. _figure_anaconda_environments:

.. figure:: images/anaconda_environments.png
   :align:  center
   :width: 400 pt

   **Anaconda Environments**

3. Click 'Create' at the bottom and a dialog appears. Provide a name for the new environment, e.g. oetoolkits
as in :ref:`figure_anaconda_create_environment` and click 'Create'.

.. note::

   On Windows, currently only Python 3.7, or 3.8 versions are supported.

.. _figure_anaconda_create_environment:

.. figure:: images/create_environment.png
   :align:  center
   :width: 400 pt

   **Create Environment**

4. When the new environment has finished initializing click 'Channels' which will bring up a dialog. Click 'Add' and enter https://conda.anaconda.org/openeye as in :ref:`figure_anaconda_add_channel`. Press enter. Then click 'Update channels'.

.. _figure_anaconda_add_channel:

.. figure:: images/add_channel.png
   :align:  center
   :width: 400 pt

   **Add OpenEye Channel**

5. The option 'Not installed' or 'All' should be selected, not 'Installed' as in :ref:`figure_anaconda_list`.

.. _figure_anaconda_list:

.. figure:: images/list_channels.png
   :align:  center
   :width: 400 pt

   **List Packages**

#. In the 'Search packages' box start to type openeye and you should see the openeye-toolkits listed. Tick the box to select them and then click 'Apply' as in :ref:`figure_anaconda_install_tks`

.. _figure_anaconda_install_tks:

.. figure:: images/install_tks.png
   :align:  center
   :width: 400 pt

   **Select OpenEye Toolkits**

6. A dialog will appear indicating openeye-toolkits and additional dependencies will be installed; click 'Apply'.

7. The toolkits have now been installed. To test this click on the green triangle next to the oetoolkits environment. Select :ref:`figure_anaconda_launch_terminal`.

.. _figure_anaconda_launch_terminal:

.. figure:: images/launch_terminal.png
   :align:  center
   :width: 400 pt

   **Open Terminal**

8. This will bring up the :ref:`figure_anaconda_prompt` with the oetoolkits environment loaded.

.. _figure_anaconda_prompt:

.. figure:: images/anaconda_prompt.png
   :align:  center
   :width: 400 pt

   **Anaconda Prompt**

9. To check the toolkits have been installed please download and run the oecheminfo.py script below::


      (C:\\Anaconda3\\envs\\oetoolkits) C:\\Users\\User Name> python oecheminfo.py
      Installed OEChem version: |oechemversion| platform: microsoft-win64-msvc14-x64 built: |builddate|
      ...

.. oe:language:: python

   .. only:: oehtml

      .. admonition:: Download code

         :download:`oecheminfo.py <../../../../wrappers/python/examples/oechem/oecheminfo.py>`

   .. only:: oepdf

      .. oe:source:: oecheminfo.py
         :language: python
