Conda vs system-wide installation

32 views
Skip to first unread message

Ignacio Martin Alliati

unread,
Mar 28, 2023, 6:57:09 AM3/28/23
to aiida...@googlegroups.com
Hello,

I currently have a system wide installation but I want to install aiida from scratch inside a conda environment. I was told these two installations shouldn't interfere with each other, but I've had lots of problems with postgres and rabbitmq ('port already in use',etc). Eventually, I uninstalled my macports versions of postgres and rabbitmq.

The error I'm getting now is that, when I do `verdi quicksetup` in my conda installation, it finds previous profiles created with my system-wide installation. I create a new profile but then, when I start the daemon, I get:

verdi daemon start 2

Critical: Could not connect to database: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: FATAL:  database "aim_aim_146efdf7f49376683b77cbb607c82d64" does not exist


(Background on this error at: https://sqlalche.me/e/14/e3q8)


Also, when I try to checking anything on my system-wide installation, I now get:

verdi status    

Critical: The configuration file has version 9 which is not compatible with the current version 5.


Any ideas? I'd be happy to completely uninstall my system-wide installation - I just wouldn't know how to do it.

Thanks,
Ignacio.
__________________________
Ignacio Martin Alliati
PhD student
Maths and Physics
Queen's University Belfast

Ignacio Martin Alliati

unread,
Mar 28, 2023, 8:18:44 AM3/28/23
to aiidausers
Ok, so I changed the default profile to the one that I created during the conda installation and now the 'storage' bullet in `verdi status` is ok.
I don't know if this will cause any more problems down the line, I'll continue setting up computers/codes and see.

My previous Aiida installation is broken anyway, so it may be sensible to uninstall it completely? I'm not sure.

Regards,
Ignacio.

mbe...@gmail.com

unread,
Apr 23, 2023, 4:20:20 AM4/23/23
to aiidausers

Hi Ignacio, Sorry for the slow response! 🙏

I’d have to look into your setup to be sure, but it’s most likely the AIIDA_PATH environment variable is causing you trouble. The AIIDA_PATH variable tells AiiDA where to look for and store your .aiida folder, which contains among other things your configuration. When having multiple AiiDA Python environments, it’s important that they each specify a different AIIDA_PATH than the default $HOME/.aiida. Else one installation will try to read the config file of the other (which also contains the profiles), and then you get issues like you are reporting.

So my suggestion is to always set the AIIDA_PATH in the activate script of your environment, as is described here:

https://aiida.readthedocs.io/projects/aiida-core/en/latest/howto/installation.html?highlight=AIIDA_PATH#isolating-multiple-instances

Interestingly, the documentation recommends to point AIIDA_PATH to inside your virtual environment directory. I typically have a project folder where I point AIIDA_PATH to, since then I can always nuke my Python environment if I need to for whatever reason.

As a side note, I’ve (very) recently started reviving aiida-project, a tool for managing different Python environments that automatically does some of this configuration for you:

https://github.com/aiidateam/aiida-project

No conda support yet, but should be coming soon!

Hope that helps! 🚀

Best,
Marnik

Reply all
Reply to author
Forward
0 new messages