Before you update your AiiDA installation, first make sure that you do the following:
- Stop your daemon by executing
verdi daemon stop
- Create a backup of your database(s) by following the guidelines in the backup section
- Create a backup of the
~/.aiidafolder (where configuration files are stored)
If you have installed AiiDA manually from a local clone of the
aiida_core repository, skip to the instructions for developers.
Otherwise, if you have installed AiiDA through
pip, you can also update your installation through
If you installed
aiida_core in a virtual environment make sure to load it first.
Now you are ready to update your AiiDA installation through
pip install --upgrade aiida_core
After upgrading your AiiDA installation you may have to perform version specific migrations. When all necessary migrations are completed, finalize the update by executing:
This updates your daemon profile and related files. It should not be done when another version of aiida is wished to be used productively on the same machine/user.
Updating AiiDA for developers¶
Each version increase may come with its own necessary migrations and you should only ever update the version by one at a time.
Therefore, first make sure you know the version number of the current installed version by using
verdi shell and typing:
import aiida aiida.__version__
After you have performed all the steps in the checklist described in the previous section and determined the current installed version, go to your local clone of the
aiida_core repository and checkout the desired branch or tag.
If you installed
aiida_core in a virtual environment make sure that you have loaded it.
Now you can install the updated version of
aiida_core by simply executing:
pip install -e .
After upgrading your AiiDA installation you may have to perform version specific migrations based on the version of your previous installation. When all necessary migrations are completed, finalize the update by executing:
This updates your daemon profile and related files.
A few general remarks:
- If you want to update the code in the same folder, but modified some files locally,
you can stash them (
git stash) before cloning or pulling the new code. Then put them back with
git stash pop(note that conflicts might appear).
- If you encounter any problems and/or inconsistencies, delete any
.pycfiles that may have remained from the previous version. E.g. If you are in your AiiDA folder you can type
find . -name "*.pyc" -type f -delete.
0.9.0, we use Alembic for the database migrations of the
SQLAlchemy backend. In case you were using SQLAlchemy before the introduction
of Alembic, you may experience problems during your first migration. If it is
the case, please have a look at the following section Debugging Alembic
Version migration instructions¶
Updating from 0.12.* to 1.0¶
- The tab-completion activation for
verdihas changed, simply replace the
eval "$(verdi completioncommand)"line in your activation script with
eval "$(_VERDI_COMPLETE=source verdi)"