Skip to content

Commit 5cb73da

Browse files
add pixi installation instructions
1 parent 42e5160 commit 5cb73da

1 file changed

Lines changed: 53 additions & 1 deletion

File tree

doc/getting-started/install.rst

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,54 @@ These instructions will install the most recent stable version of CLIMADA withou
139139
140140
mamba install -n climada_env -c conda-forge climada-petals
141141
142+
.. attention::
143+
144+
On Windows, installing ``climada-petals`` with Conda/Mamba may be prohibited as it takes forever to resolve the dependency tree.
145+
In these cases, `Pixi`_ is often the only reliable fallback (s.b.).
146+
147+
.. _install-pixi:
148+
149+
-------------------
150+
Simple Instructions with Pixi (Alternative)
151+
-------------------
152+
153+
As an alternative to mamba `Pixi`_ can be used to install climada from conda-forge.
154+
Pixi is a modern package manager, based on Conda, that offers much faster dependency resolution.
155+
156+
#. Open the command line and create a new folder for your Pixi project:
157+
158+
.. code-block:: shell
159+
160+
pixi init climada_pixi
161+
162+
.. _install-simple:
163+
164+
#. Add CLIMADA from ``conda-forge``:
165+
166+
.. code-block:: shell
167+
168+
pixi add --manifest-path climada_pixi/pixi.toml climada
169+
170+
#. Verify that everything is installed correctly by executing a single test:
171+
172+
.. code-block:: shell
173+
174+
# the pixi way to activate an environment
175+
pixi shell --manifest-path climada_pixi/pixi.toml
176+
# execute the test
177+
python -m unittest climada.engine.test.test_impact
178+
# the pixi way to deactivate an environment
179+
exit
180+
181+
Executing CLIMADA for the first time in a pixi environment will take quite some time because it will generate
182+
a directory tree in your home/user directory. If this test passes, great! You are good to go.
183+
184+
#. *Optional:* Install CLIMADA Petals into the same Pixi environment:
185+
186+
.. code-block:: shell
187+
188+
pixi add --manifest-path climada_pixi/pixi.toml climada-petals
189+
142190
.. _install-advanced:
143191

144192
---------------------------------------------
@@ -264,7 +312,7 @@ However, if you want to develop CLIMADA, we strongly recommend you install them.
264312

265313
With the ``climada_env`` activated, enter the workspace directory and then the CLIMADA repository as above.
266314
Then, add the ``test`` extra specification to the ``pip install`` command (**mind the quotation marks**,
267-
and see also `pip install examples <https://pip.pypa.io/en/stable/cli/pip_install/#examples>`_):
315+
and see also `pip install examples <https://pip.pypa.io/en/stable/cli/pip_install/#examples>`_):
268316

269317
.. code-block:: shell
270318
@@ -710,6 +758,9 @@ Terminal, Command Line
710758
`Mamba`_
711759
The faster reimplementation of the ``conda`` package manager.
712760

761+
`Pixi`_
762+
The much faster modern package manager based on ``conda``.
763+
713764
Environment (Programming)
714765
A setup where only a specific set of modules and programs can interact.
715766
This is especially useful if you want to install programs with mutually incompatible requirements.
@@ -737,4 +788,5 @@ IDE
737788
.. _Conda: https://docs.conda.io/en/latest/
738789
.. _Mamba: https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html
739790
.. _Miniforge: https://github.com/conda-forge/miniforge
791+
.. _Pixi: https://pixi.sh/
740792
.. _CLIMADA Petals: https://climada-petals.readthedocs.io/en/latest/

0 commit comments

Comments
 (0)