You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I correct myself: When testing locally, I discovered a file ~/.ipython/profile_default/startup/aiida.py (probably left over from a long time ago). This obviously has the potential to confuse import aiida ;-)
The steps from the documentation seem to work fine, as does the current aiida_ipython_magics.py file from the aiida-core repo.
In [1]: %aiida
Out[1]:
Loaded AiiDA DB environment - profile name: nanoporous_pipeline.
We should still update the snippet from the docs to coincide with the code from the repo (and eventually test it).
Will take care of the first part; perhaps also the second.
In [1]: %aiida
UsageError: Line magic function `%aiida` not found.
following the updated documentation for aiida 1.4.2 here.
I restarted the kernel and made sure the correct ipython is run for the environment. Still not working.
Then I pip install aiida-core[notebook] and restarted the kernel and cleared output, and now it works. So either the pip install helped, or restarted the kernel+clear output.
@hududed if pip install aiida-core[notebook] solved the problem, then the issue was likely that the ipython executable you were using was not the one from the AiiDA python environment.
Describe the bug
It seems the instructions for enabling the
%aiida
ipython magic are broken.Steps to reproduce
pip install aiida-core[notebook]
~/.ipython/profile_default/startup/aiida_magics.py
ipython
shell%aiida
Expected behavior
The magics are enabled.
Furthermore, it seems the snippet in the docs is outdated wrt to the one in the codebase (but neither work).
The ipython magics is already listed as one of the few remaining offenders of completely untested code: #2835
Your environment
The text was updated successfully, but these errors were encountered: