Skip to content

Commit

Permalink
Changing indentation of code-blocks in installation instruction
Browse files Browse the repository at this point in the history
Removing the 'double-block' for code in a list, that seems to be a bug in sphinx-docs? Now also more control on the numbering of items

Also updating some of the texts
  • Loading branch information
erikvansebille committed Aug 3, 2023
1 parent 3f432ad commit 6987f89
Showing 1 changed file with 29 additions and 24 deletions.
53 changes: 29 additions & 24 deletions docs/installation.rst
Original file line number Diff line number Diff line change
@@ -1,51 +1,56 @@
Basic installation
==================

The simplest way to install the Parcels code is to use Anaconda and the `Parcels conda-forge package <https://anaconda.org/conda-forge/parcels>`_ with the latest release of Parcels. This package will automatically install all the requirements for a fully functional installation of Parcels. This is the “batteries-included” solution probably suitable for most users. If you want to install the latest development version of Parcels and work with features that have not yet been officially released, you can follow the instructions for a `developer installation <#installation-for-developers>`_.
The simplest way to install the Parcels code is to use Anaconda and the `Parcels conda-forge package <https://anaconda.org/conda-forge/parcels>`_ with the latest release of Parcels. This package will automatically install all the requirements for a fully functional installation of Parcels. This is the “batteries-included” solution probably suitable for most users.

The steps below are the installation instructions for Linux / macOS and for Windows. If the commands for Linux / macOS and Windows differ, this is indicated with a comment at the end of the line.
If you want to install the latest development version of Parcels and work with features that have not yet been officially released, you can follow the instructions for a `developer installation <#installation-for-developers>`_.

#. Install Anaconda's Miniconda following the steps at https://conda.io/docs/user-guide/install/, making sure to select the Python-3 version. If you're on Linux /macOS, it also assumes that you installed Miniconda-3 to your home directory.
The steps below are the installation instructions for Linux, macOS and Windows.

#. Start a terminal (Linux / macOS) or the Anaconda prompt (Windows). Activate the ``base`` environment of your Miniconda and create an environment containing Parcels, all its essential dependencies, and the nice-to-have cartopy and jupyter packages:
**Step 1:** Install Anaconda's Miniconda following the steps at https://conda.io/docs/user-guide/install/, making sure to select the Python-3 version. If you're on Linux /macOS, the following assumes that you installed Miniconda to your home directory.

.. code-block:: bash
**Step 2:** Start a terminal (Linux / macOS) or the Anaconda prompt (Windows). Activate the ``base`` environment of your Miniconda and create an environment containing Parcels, all its essential dependencies, and the nice-to-have cartopy and jupyter packages:

conda activate base
conda create -n parcels -c conda-forge parcels cartopy
.. code-block:: bash
conda activate base
conda create -n parcels -c conda-forge parcels cartopy jupyter
.. note::
.. note::

For some of the examples, ``pytest`` also needs to be installed. This can be quickly done with ``conda install -n parcels pytest`` which installs ``pytest`` directly into the newly created ``parcels`` environment.
For some of the examples, ``pytest`` also needs to be installed. This can be quickly done with ``conda install -n parcels pytest`` which installs ``pytest`` directly into the newly created ``parcels`` environment.

#. Activate the newly created Parcels environment:
**Step 3:** Activate the newly created Parcels environment:

.. code-block:: bash
.. code-block:: bash
conda activate parcels
conda activate parcels
#. Download `a zipped copy <https://docs.oceanparcels.org/en/latest/_downloads/307c382eb1813dc691e8a80d6c0098f7/parcels_tutorials.zip>`_ of the Parcels tutorials and examples and unzip it.
**Step 4:** Download `a zipped copy <https://docs.oceanparcels.org/en/latest/_downloads/307c382eb1813dc691e8a80d6c0098f7/parcels_tutorials.zip>`_ of the Parcels tutorials and examples and unzip it.

#. Go to the unzipped folder and run one of the examples to validate that you have a working Parcels setup:
**Step 5:** Go to the unzipped folder and run one of the examples to validate that you have a working Parcels setup:

.. code-block:: bash
.. code-block:: bash
python example_peninsula.py --fieldset 100 100
python example_peninsula.py --fieldset 100 100
.. note::
If you are on macOS and get a compilation error, you may need to accept the Apple xcode license ``xcode-select --install``. If this does not solve the compilation error, you may want to try running ``export CC=gcc``. If the compilation error remains, you may want to check `this solution <https://stackoverflow.com/a/58323411/5172570>`_.
.. note::
If you are on macOS and get a compilation error, you may need to accept the Apple xcode license ``xcode-select --install``. If this does not solve the compilation error, you may want to try running ``export CC=gcc``. If the compilation error remains, you may want to check `this solution <https://stackoverflow.com/a/58323411/5172570>`_.

*Optionally:* if you want to run all the examples and tutorials, start Jupyter and open the tutorial notebooks:

.. code-block:: bash
#. Optionally, if you want to run all the examples and tutorials, start Jupyter and open the tutorial notebooks:
jupyter notebook
.. code-block:: bash
jupyter notebook
.. note::

#. The next time you start a terminal and want to work with Parcels, activate the environment with:
The next time you start a terminal and want to work with Parcels, activate the environment with:

.. code-block:: bash
.. code-block:: bash
conda activate parcels
conda activate parcels
Installation for developers
Expand Down

0 comments on commit 6987f89

Please sign in to comment.