Skip to content

Commit 0548d95

Browse files
peanutfunchahank
andauthored
Suggest installing CLIMADA via conda in installation instructions (#714)
* Add instructions for installing Climada directly with conda * Update README.md --------- Co-authored-by: Chahan M. Kropf <[email protected]>
1 parent 76d6d36 commit 0548d95

File tree

3 files changed

+29
-50
lines changed

3 files changed

+29
-50
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Removed:
3535
- Improved error messages produced by `ImpactCalc.impact()` in case hazard type is not found in exposures/impf_set [#691](https://github.com/CLIMADA-project/climada_python/pull/691)
3636
- Tests with long runtime were moved to integration tests in `climada/test` [#709](https://github.com/CLIMADA-project/climada_python/pull/709)
3737
- Use `myst-nb` for parsing Jupyter Notebooks for the documentation instead of `nbsphinx` [#712](https://github.com/CLIMADA-project/climada_python/pull/712)
38+
- Installation guide now recommends installing CLIMADA directly via `conda install` [#714](https://github.com/CLIMADA-project/climada_python/pull/714)
3839

3940
### Fixed
4041

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ This is the Python (3.8+) version of CLIMADA - please see https://github.com/dav
1919

2020
## Getting started
2121

22-
CLIMADA runs on Windows, macOS and Linux. It can be installed from sources or - in case of climada_python - directly with pip. See the [installation guide](https://climada-python.readthedocs.io/en/latest/guide/install.html) for instructions.
22+
CLIMADA runs on Windows, macOS and Linux.
23+
The released versions of the CLIMADA core can be installed directly through Anaconda:
24+
```shell
25+
conda install -c conda-forge climada
26+
```
27+
It is **highly recommended** to install CLIMADA into a **separate** Anaconda environment.
28+
See the [installation guide](https://climada-python.readthedocs.io/en/latest/guide/install.html) for further information.
2329

2430
Follow the [tutorial](https://climada-python.readthedocs.io/en/latest/tutorial/1_main_climada.html) `climada_python-x.y.z/doc/tutorial/1_main_climada.ipynb` in a Jupyter Notebook to see what can be done with CLIMADA and how.
2531

doc/guide/install.rst

Lines changed: 21 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,6 @@ Prerequisites
2525
All dependencies will be downloaded from the internet.
2626
Do **not** use a metered, mobile connection!
2727
* Install `Anaconda`_, following the `installation instructions <https://docs.anaconda.com/anaconda/install/>`_ for your OS.
28-
* Create a **workspace directory**.
29-
To make sure that your user can manipulate it without special privileges, use a subdirectory of your user/home directory.
30-
Do **not** use a directory that is synchronized by cloud storage systems like OneDrive, iCloud or Polybox!
31-
* **Linux** users need to make sure they have ``git`` and ``curl`` installed.
32-
Ubuntu and Debian users may use APT:
33-
34-
.. code-block:: shell
35-
36-
apt update
37-
apt install curl git
38-
39-
Both commands will probably require administrator rights, which can be enabled by prepending ``sudo``.
4028

4129
.. hint:: If you need help with the vocabulary used on this page, refer to the :ref:`Glossary <install-glossary>`.
4230

@@ -62,29 +50,12 @@ Simple Instructions
6250

6351
These instructions will install the most recent stable version of CLIMADA without cloning its repository.
6452

65-
#. Open the command line and navigate to the workspace directory you created.
66-
The command for entering a directory is ``cd``.
67-
Use the following command, where you replace ``<path/to/workspace>`` with the actual path of the workspace folder:
53+
#. Open the command line.
54+
Create a new conda environment with CLIMADA by executing
6855

6956
.. code-block:: shell
7057
71-
cd <path/to/workspace>
72-
73-
#. Download the Anaconda environment specifications for CLIMADA using ``curl``:
74-
75-
.. code-block:: shell
76-
77-
curl -o env_climada.yml https://raw.githubusercontent.com/CLIMADA-project/climada_python/main/requirements/env_climada.yml
78-
79-
Alternatively, download the file through your browser and place it into the workspace directory: :download:`env_climada.yml </../requirements/env_climada.yml>`
80-
81-
#. Instruct Anaconda to create a new environment called ``climada_env`` from the specification file:
82-
83-
.. code-block:: shell
84-
85-
conda env create -n climada_env -f env_climada.yml
86-
87-
This might take around 5 minutes, depending on your internet connection speed and computer hardware.
58+
conda create -n climada_env -c conda-forge climada
8859
8960
#. Activate the environment:
9061

@@ -95,12 +66,6 @@ These instructions will install the most recent stable version of CLIMADA withou
9566
You should now see ``(climada_env)`` appear in the beginning of your command prompt.
9667
This means the environment is activated.
9768

98-
#. Download and install the stable CLIMADA version using ``pip``:
99-
100-
.. code-block:: shell
101-
102-
python -m pip install climada
103-
10469
#. Verify that everything is installed correctly by executing a single test:
10570

10671
.. code-block:: shell
@@ -120,6 +85,21 @@ Advanced Instructions
12085

12186
For advanced Python users or developers of CLIMADA, we recommed cloning the CLIMADA repository and installing the package from source.
12287

88+
#. If you are using a **Linux** OS, make sure you have ``git`` installed
89+
(Windows and macOS users are good to go once Anaconda is installed).
90+
On Ubuntu and Debian, you may use APT:
91+
92+
.. code-block:: shell
93+
94+
apt update
95+
apt install git
96+
97+
Both commands will probably require administrator rights, which can be enabled by prepending ``sudo``.
98+
99+
#. Create a **workspace directory**.
100+
To make sure that your user can manipulate it without special privileges, use a subdirectory of your user/home directory.
101+
Do **not** use a directory that is synchronized by cloud storage systems like OneDrive, iCloud or Polybox!
102+
123103
#. Open the command line and navigate to the workspace directory you created using ``cd``.
124104
Replace ``<path/to/workspace>`` with the path of the directory that contains the workspace folder:
125105

@@ -381,19 +361,11 @@ Updating CLIMADA
381361
We recommend keeping CLIMADA up-to-date.
382362
To update, follow the instructions based on your :ref:`installation type <install-choice>`:
383363

384-
* **Simple Instructions:** Activate the environment and update CLIMADA using ``pip``:
385-
386-
.. code-block:: shell
387-
388-
conda activate climada_env
389-
python -m pip install -U climada
390-
391-
Then, download the latest environment specifications: :download:`env_climada.yml </../requirements/env_climada.yml>`.
392-
Use them to update the existing environment:
364+
* **Simple Instructions:** Update CLIMADA using ``conda``:
393365

394366
.. code-block:: shell
395367
396-
conda env update -n climada_env -f env_climada.yml
368+
conda update -n climada_env -c conda-forge climada
397369
398370
* **Advanced Instructions:** Move into your local CLIMADA repository and pull the latest version of your respective branch:
399371

@@ -514,7 +486,7 @@ All of these approaches can also be combined.
514486
`Mamba <https://mamba.readthedocs.io/en/latest/>`_ Instead of Anaconda
515487
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
516488

517-
If you prefer using Mamba, you should be able to simply replace all ``conda`` commands with ``mamba``, **except** ``conda activate`` and ``conda deactivate``.
489+
If you prefer using Mamba, you should be able to simply replace all ``conda`` commands with ``mamba``.
518490
Note that we can only provide **limited support** for Mamba installations!
519491

520492
Error: ``operation not permitted``

0 commit comments

Comments
 (0)