From 962b6a98e99a69a0f297f87c330cac8d8e1046f9 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Tue, 7 Jan 2025 22:11:10 +0100 Subject: [PATCH] added conda details (#368) --- docs/install.rst | 85 ++++++++++++++++++------------------------------ 1 file changed, 31 insertions(+), 54 deletions(-) diff --git a/docs/install.rst b/docs/install.rst index d7f2f97f..3d4a1c7b 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -1,87 +1,64 @@ Install ======= -You might wish to create a virtual environment to install Paramak into. This can be done using the venv module in Python. For more information, see the `official Python documentation `_. -.. code-block:: bash - - python -m venv paramak-venv - source paramak-venv/bin/activate +Paramak is distributed via `PyPI `_ and `Conda Forge `_ can be installed using pip or Conda / Mamba. -Paramak is distributed via `PyPI `_ and can be installed using pip. +Install from PyPI using pip .. code-block:: bash python -m pip install paramak +Install from Conda Forge using Conda or Mamba +.. code-block:: bash -.. Prerequisites -.. ------------- - -.. To use of Paramak you will need Python 3 installed using Miniconda or Anaconda, or Miniforge - -.. * `Miniforge `_ recommended as it includes Mamba -.. * `Miniconda `_ -.. * `Anaconda `_ - - - -.. Once you have a version of Mamba or Conda installed then proceed with the Paramak specific steps. - - -.. Install (mamba) -.. --------------- - -.. This is the recommended method as it installs all the dependencies and Mamba is faster and requires less RAM than the pure Conda method. - -.. Create a new environment (with your preferred python version). - -.. .. code-block:: bash - -.. mamba create --name paramak_env python=3.12 - - -.. Then activate the new environment. - -.. .. code-block:: bash - -.. mamba activate paramak_env + mamba install -c conda-forge paramak + conda install -c conda-forge paramak -.. Then install the Paramak. -.. .. code-block:: bash +Prerequisites +------------- -.. mamba install -c conda-forge paramak +It is recommended to create a virtual environment to install Paramak into. -.. Now you should be ready to import paramak from your new python environment. +This can be done using the `venv module `_ in or a Conda or Mamba environment. -.. Install (conda) -.. --------------- +To create a virtual environment using the venv module -.. Create a new environment (with your preferred python version). +.. code-block:: bash -.. .. code-block:: bash + sudo apt-get update + sudo apt-get install python3-virtualenv + python -m venv paramak-venv + source paramak-venv/bin/activate -.. conda create --name paramak_env python=3.12 +To create a virtual environment using Conda or Mamba +First install Miniconda or Anaconda, or Miniforge -.. Then activate the new environment. +* `Miniforge `_ recommended as it includes Mamba +* `Miniconda `_ +* `Anaconda `_ -.. .. code-block:: bash +Once you have a version of Mamba or Conda installed then proceed with creating the virtual environment. -.. conda activate paramak_env +Create a new environment with mamba and your preferred python version then activate the new environment. -.. Then install the Paramak. +.. code-block:: bash -.. .. code-block:: bash + mamba create --name paramak_env python=3.12 + mamba activate paramak_env -.. mamba install -c conda-forge paramak +Or with Conda -.. Now you should be ready to import paramak from your new python environment. +.. code-block:: bash + conda create --name paramak_env python=3.12 + conda activate paramak_env Developer Installation @@ -106,4 +83,4 @@ package and the dependencies using pip with e -e (developer option). .. code-block:: bash cd paramak - pip install -e . + python -m pip install -e .