From 8c7a09b6991fae6bcf6a41db2b37873615557501 Mon Sep 17 00:00:00 2001 From: Santiago Soler Date: Wed, 27 Mar 2024 09:29:24 -0700 Subject: [PATCH] Improve installation instructions in the docs (#483) Update the `doc/install.rst` file by applying the same design used in other of the Fatiando packages. --- doc/install.rst | 78 +++++++++++++++++++++++-------------------------- 1 file changed, 36 insertions(+), 42 deletions(-) diff --git a/doc/install.rst b/doc/install.rst index 02ef25f9c..c8c3e97c7 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -3,20 +3,48 @@ Installing ========== +There are different ways to install Harmonica: + +.. tab-set:: + + .. tab-item:: pip + + Using the `pip package manager `__: + + .. code:: bash + + pip install harmonica + + .. tab-item:: conda/mamba + + Using the `conda package manager `__ (or ``mamba``) + that comes with the Anaconda/Miniconda distribution: + + .. code:: bash + + conda install harmonica --channel conda-forge + + .. tab-item:: Development version + + You can use ``pip`` to install the latest **unreleased** version from + GitHub (**not recommended** in most situations): + + .. code:: bash + + python -m pip install --upgrade git+https://github.com/fatiando/harmonica + +.. note:: + + The commands above should be executed in a terminal. On Windows, use the + ``cmd.exe`` or the "Anaconda Prompt" app if you’re using Anaconda. + + Which Python? ------------- You'll need **Python 3.8 or greater**. See :ref:`python-versions` if you require support for older versions. -We recommend using the -`Anaconda Python distribution `__ -to ensure you have all dependencies installed and the ``conda`` package manager -available. -Installing Anaconda does not require administrative rights to your computer and -doesn't interfere with any other Python installations in your system. - - Dependencies ------------ @@ -58,40 +86,6 @@ The examples in the :ref:`gallery` also use: * `pyproj `__ for cartographic projections - -Installing with conda ---------------------- - -You can install Harmonica using the `conda package manager -`__ that comes with the Anaconda distribution:: - - conda install harmonica --channel conda-forge - - -Installing with pip -------------------- - -Alternatively, you can also use the `pip package manager -`__:: - - pip install harmonica - - -Installing the latest development version ------------------------------------------ - -You can use ``pip`` to install the latest source from Github:: - - pip install git+https://github.com/fatiando/harmonica - -Alternatively, you can clone the git repository locally and install from -there:: - - git clone https://github.com/fatiando/harmonica.git - cd harmonica - pip install . - - Testing your install --------------------