diff --git a/tutorial_environments.rst b/tutorial_environments.rst index 265b70c28..0ddb33560 100644 --- a/tutorial_environments.rst +++ b/tutorial_environments.rst @@ -373,11 +373,22 @@ So, adding specs to an environment at a later point in time will not cause exist Adding and installing specs incrementally leads to greedy concretization, meaning that the environment may have different package versions compared to an environment created all at once. When you first install ``python`` in an environment, Spack will pick a recent version. -If you then add ``py-numpy``, it may be in conflict with the ``python`` version already installed, and fail to concretize: + .. literalinclude:: outputs/environments/incremental-1.out :language: spec +If you then add ``py-numpy``, it may be in conflict with the ``python`` version already installed, and fail to concretize. + +.. warning:: + + There is a known bug in Spack that causes this set of specs to take over an hour to concretize, so there is no need to run it for this tutorial. + +.. code-block:: spec + + $ spack install --add py-numpy@1.20 2>&1 | tail -n1 + internal_error("version weights must exist and be unique"). Couldn't concretize without changing the existing environment. If you are ok with changing it, try `spack concretize --force`. You could consider setting `concretizer:unify` to `when_possible` or `false` to allow multiple versions of some packages. + The solution is to re-concretize the environment as a whole, which causes ``python`` to downgrade to a version compatible with ``py-numpy``: .. literalinclude:: outputs/environments/incremental-2.out