AiiDA-VASP installation into Conda environment

Hello,

I am trying to install AiiDA and AiiDA-VASP on a machine that I do not have administrative privileges, hence I am installing everything in a conda environment.

The problem is that there is no combination of packages that is possible to install aiida-core, aiida-core.services, and aiida-vasp. I tried several combinations base on the incompatibility error messages from β€˜mamba’ and it never worked.

Here is one example:

mamba create -n aiida -c conda-forge python=3.10 aiida-core aiida-core.services aiida-vasp pymatgen=2020.10.20

Looking for: ['python=3.10', 'aiida-core', 'aiida-core.services', 'aiida-vasp', 'pymatgen=2020.10.20']

warning  libmamba Cache file "/home/lovelace/proj/proj962/dorinitt/programs/miniforge3/pkgs/cache/497deca9.json" was modified by another program
warning  libmamba Cache file "/home/lovelace/proj/proj962/dorinitt/programs/miniforge3/pkgs/cache/09cdf8bf.json" was modified by another program
conda-forge/noarch                                  12.6MB @  33.6MB/s  0.4s
conda-forge/linux-64                                30.6MB @  67.3MB/s  0.5s
Could not solve for environment specs
The following packages are incompatible
β”œβ”€ aiida-vasp is installable and it requires
β”‚  └─ pymatgen <=2020.12.3  with the potential options
β”‚     β”œβ”€ pymatgen [2019.10.16|2019.10.3|...|2020.9.14] would require
β”‚     β”‚  └─ python >=3.6,<3.7.0a0 , which can be installed;
β”‚     β”œβ”€ pymatgen [2019.10.16|2019.10.3|...|2020.9.14] would require
β”‚     β”‚  └─ python >=3.7,<3.8.0a0 , which can be installed;
β”‚     β”œβ”€ pymatgen [2019.11.11|2019.12.22|...|2020.9.14] would require
β”‚     β”‚  └─ python >=3.8,<3.9.0a0 , which can be installed;
β”‚     β”œβ”€ pymatgen 2020.10.20 would require
β”‚     β”‚  β”œβ”€ python >=3.6,<3.7.0a0 , which can be installed;
β”‚     β”‚  └─ python_abi 3.6.* *_cp36m, which can be installed;
β”‚     β”œβ”€ pymatgen 2020.10.20 would require
β”‚     β”‚  β”œβ”€ python >=3.7,<3.8.0a0 , which can be installed;
β”‚     β”‚  └─ python_abi 3.7.* *_cp37m, which can be installed;
β”‚     β”œβ”€ pymatgen 2020.10.20 would require
β”‚     β”‚  β”œβ”€ python >=3.8,<3.9.0a0 , which can be installed;
β”‚     β”‚  └─ python_abi 3.8.* *_cp38, which can be installed;
β”‚     β”œβ”€ pymatgen 2020.10.20 would require
β”‚     β”‚  β”œβ”€ python >=3.9,<3.10.0a0 , which can be installed;
β”‚     β”‚  └─ python_abi 3.9.* *_cp39, which can be installed;
β”‚     └─ pymatgen [2020.11.11|2020.12.3] would require
β”‚        └─ python >=3.9,<3.10.0a0 , which can be installed;
β”œβ”€ pymatgen 2020.10.20** , which can be installed (as previously explained);
└─ python 3.10**  is not installable because there are no viable options
   β”œβ”€ python 3.10.8 conflicts with any installable versions previously reported;
   └─ python [3.10.0|3.10.1|...|3.10.9] would require
      └─ python_abi 3.10.* *_cp310, which conflicts with any installable versions previously reported.

When I install both in my own computer using β€˜pip install aiida-core aiida-vasp’ it runs normally. I think that there might be some incompatibility between aiida-vasp and aiida-core.services.

Thanks in advance!

Hi @DoriniTT! I’m not much of a conda/mamba user I’m afraid. But looking at the output the conflict seems to be with the Python version and pymatgen<=2020.12.3 as required by aiida-vasp. Indeed, that pymatgen version doesn’t seem to suppourt Python 3.10 yet:

(even Python 3.9 isn’t supported).

Looking into this some more, it’s probably related to the fact that the conda-forge feedstock is outdated for aiida-vasp, see:

https://github.com/conda-forge/aiida-vasp-feedstock/pulls

To explain, every PyPI release also requires merging a PR into the feedstock to provide support for conda installations via conda-forge. If this isn’t done, that release can’t be installed with conda-forge. So the latest conda-forge version of the aiida-vasp package is v2.1.1, see:

https://anaconda.org/conda-forge/aiida-vasp

And I’m assuming that still was running aiida-core v1.X, so the pymatgen version would be quite old.

I’ll touch base with the feedstock maintainer and see if I can’t take over maintenance, or gently ask the aiida-vasp plugin developers to do so. :slight_smile:

2 Likes

Hi Marnik!

Thanks a lot for the explanation, I’m not a conda/mamba user either, so I didn’t grasp the root of the problem. Now it is clear to me. Since I think there is no workaround for the machine that I have access, I think I’ll try to install the old version of aiida-core and aiida-vasp to get things started. I’ll keep an eye on the updates regarding conda-forge and aiida-vasp, please let me know when you have news on this matter. :slight_smile:
Have a nice day!
Kind regards,
Thiago

Hi Marnik,

I got the solution to this problem from the aiida-vasp support channel and wanted to post here for the record.
It is quite simple. You can install aiida-core and aiida-core.services normally using conda:

mamba create -n aiida -c conda-forge aiida-core aiida-core.services
mamba activate aiida

Then install aiida-vasp with pip normally inside the conda environment:

pip install aiida-vasp

The only thing to consider is to remember to avoid using conda again in the same environment as it can make changes that pip is not aware of.

Thanks for reporting back @DoriniTT! Indeed, you can mix package managers, but I’ve had to troubleshoot some pretty messed up environments from people doing this, so I try to avoid it. ^^ But indeed it probably works fine as long as you’re careful!

I’ve been added as a maintainer on the aiida-vasp feedstock, but unfortunately not yet on some of the dependencies (e.g. parsevasp). Once I’m added there I can update all the feedstocks and make aiida-vasp installable again via conda.

I can imagine! It works as long as you are very careful :slightly_smiling_face:

Ok! Thank you very much!

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.