If you experience any problems, first check that all services are up and running:
verdi status ✓ profile: On profile django ✓ repository: /repo/aiida_dev/django ✓ postgres: Connected to aiida@localhost:5432 ✓ rabbitmq: Connected to amqp://127.0.0.1?heartbeat=600 ✓ daemon: Daemon is running as PID 2809 since 2019-03-15 16:27:52
In the example output, all service have a green check mark and so should be running as expected. If all services are up and running and you are still experiencing problems, consider the commonly encountered problems below.
[numpy dependency] On a clean Ubuntu 16.04 install the pip install command
pip install -e aiida-coremay fail due to a problem with dependencies on the
numpypackage. In this case you may be presented with a message like the following:
from numpy.distutils.misc_util import get_numpy_include_dirs ImportError: No module named numpy.distutils.misc_util
To fix this, simply install
numpyindividually through pip in your virtual env, i.e.:
pip install numpy
followed by executing the original install command once more:
pip install -e aiida-core
This should fix the dependency error.
[Database installation and location] If the installation fails while installing the packages related to the database, you may have not installed or set up the database libraries.
In particular, on Mac OS X, if you installed the binary package of PostgreSQL, it is possible that the PATH environment variable is not set correctly, and you get a “Error: pg_config executable not found.” error. In this case, discover where the binary is located, then add a line to your
~/.bashrcfile similar to the following:
and then open a new bash shell. Some possible paths can be found at this Stackoverflow link and a non-exhaustive list of possible paths is the following (version number may change):
Similarly, if the package installs but then errors occur during the first of AiiDA (with
Symbol not founderrors or similar), you may need to point to the path where the dynamical libraries are. A way to do it is to add a line similar to the following to the
~/.bashrcand then open a new shell:
(you should of course adapt the path to the PostgreSQL libraries).
[ensuring a UTF-8 locale]For some reasons, on some machines (notably often on Mac OS X) there is no default locale defined, and when you run
verdi setupfor the first time it fails (see also this issue of django). Run in your terminal (or maybe even better, add to your
.bashrc, but then remember to open a new shell window!):
export LANG="en_US.UTF-8" export LC_ALL="en_US.UTF-8"
and then run
[possible Ubuntu dependencies] Several users reported the need to install also
libpq-dev(header files for libpq5 - PostgreSQL library):
apt-get install libpq-dev
But under Ubuntu 12.04 this is not needed.
verdi not in PATH¶
aiida-core python package should add the
verdi CLI to your
verdi executable is not available in your terminal, the folder where
pip places binaries may not be added to your
For Linux systems, this folder is usually something like
For Mac OS X systems, the path to add is usually
After updating your
verdi command should be available.
A preprequisite for
verdito work is that the
aiidapython package is importable. Test this by opening a
ipythonshell and typing:import aiida
If you get an
ImportError (and you are in the environment where AiiDA was installed),
you can add it to the
Configuring remote SSH computers¶
[ssh_kerberos installation] When installing the
ssh_kerberosoptional requirement through Anaconda you may encounter the following error on Ubuntu machines:
version 'GFORTRAN_1.4' not found (required by /usr/lib/libblas.so.3)
This is related to an open issue in anaconda ContinuumIO/anaconda-issues#686. A potential solution is to run the following command:
[Output from .bashrc and/or .bash_profile on remote computers] (NOTE This applies also computers configured via
When connecting to remote computers, AiiDA (like other codes as
sftp) can get confused if you have code in your
.bash_profilethat produces output or e.g. runs commands like
cleanthat require a terminal.
For instance, if you add a
echo "a"in your
.bashrcand then try to SFTP a file from it, you will get an error like
Received message too long 1091174400.
If you still want to have code that needs an interactive shell (
clean, …), but you want to disable it for non-interactive shells, put at the top of your file a guard like this:
if [[ $- != *i* ]] ; then # Shell is non-interactive. Be done now! return fi
Everything below this will not be executed in a non-interactive shell. Note: Still, you might want to have some code on top, like e.g. setting the PATH or similar, if this needs to be run also in the case of non-interactive shells.
To test if a the computer does not produce spurious output, run (after configuring):
verdi computer test <COMPUTERNAME>
which checks and, in case of problems, suggests how to solve the problem. You can track the discussion on this issue in aiidateam/aiida-core#1890.
Improvements for dependencies¶
[Activating the ASE visualizer] Within a virtual environment, attempt to visualize a structure with
ase(either from the shell, or using the command
verdi data structure show --format=ase <PK>), might end up with the following error message:
ImportError: No module named pygtk
The issue is that
pygtkis currently not pip-installable. One has to install it separately and create the appropriate bindings manually in the virtual environment. You can follow the following procedure to get around this issue:
python-gtk2package. Under Ubuntu, do:
sudo apt-get install python-gtk2
lib/python2.7/dist-packagesfolder within your virtual environment:
mkdir <AIIDA_VENV_FOLDER>/lib/python2.7/dist-packages chmod 755 <AIIDA_VENV_FOLDER>/lib/python2.7/dist-packages
<AIIDA_VENV_FOLDER>is the virtual environment folder you have created during the installation process.
Create several symbolic links from this folder, pointing to a number of files in
cd <AIIDA_VENV_FOLDER>/lib/python2.7/dist-packages ln -s /usr/lib/python2.7/dist-packages/glib glib ln -s /usr/lib/python2.7/dist-packages/gobject gobject ln -s /usr/lib/python2.7/dist-packages/gtk-2.0 gtk-2.0 ln -s /usr/lib/python2.7/dist-packages/pygtk.pth pygtk.pth ln -s /usr/lib/python2.7/dist-packages/pygtk.py pygtk.py ln -s /usr/lib/python2.7/dist-packages/cairo cairo
verdi data structure show --format=ase <PK>should work.
Use in ipython/jupyter¶
In order to use the AiiDA objects and functions in Jupyter, this latter has to be instructed to use the iPython kernel installed in the AiiDA virtual environment. This happens by default if you install AiiDA with
notebookoption and run Jupyter from the AiiDA virtual environment.
If, for any reason, you do not want to install Jupyter in the virtual environment, you might consider to install it out of the virtual environment, if not already done:
pip install jupyter
Then, activate the AiiDA virtual environment:
and setup the AiiDA iPython kernel:
pip install ipykernel python -m ipykernel install --user --name=<aiida.kernel.name>
where you have chosen a meaningful name for the new kernel.
Finally, start a Jupyter server:
and from the newly opened browser tab select
New -> <aiida.kernel.name>
Postgres restart problem¶
Due to a bug <https://wiki.postgresql.org/wiki/May_2015_Fsync_Permissions_Bug> affecting older postgres versions (<9.4), PostgreSQL could refuse to restart after a crash or after a restore from binary backup.
The error message would be something like:
* Starting PostgreSQL 9.1 database server * The PostgreSQL server failed to start. Please check the log output: 2015-05-26 03:27:20 UTC [331-1] LOG: database system was interrupted; last known up at 2015-05-21 19:56:58 UTC 2015-05-26 03:27:20 UTC [331-2] FATAL: could not open file "/etc/ssl/certs/ssl-cert-snakeoil.pem": Permission denied 2015-05-26 03:27:20 UTC [330-1] LOG: startup process (PID 331) exited with exit code 1 2015-05-26 03:27:20 UTC [330-2] LOG: aborting startup due to startup process failure
If this happens you should change the permissions on any symlinked files to being writable by the Postgres user. For example, on Ubuntu, with PostgreSQL 9.1, the following should work (WARNING: Make sure these configuration files are symbolic links before executing these commands! If someone has customized the server.crt or server.key file, you can erase them by following these steps. It’s a good idea to make a backup of the server.crt and server.key files before removing them):
(as root) # go to PGDATA directory cd /var/lib/postgresql/9.1/main ls -l server.crt server.key # confirm both of those files are symbolic links # to files in /etc/ssl before going further # remove symlinks to SSL certs rm server.crt rm server.key # copy the SSL certs to the local directory cp /etc/ssl/certs/ssl-cert-snakeoil.pem server.crt cp /etc/ssl/private/ssl-cert-snakeoil.key server.key # set permissions on ssl certs # and postgres ownership on everything else # just in case chown postgres * chmod 640 server.crt server.key service postgresql start