■ Purpose
mp-api is highly dependent on some library versions, and updating the libraries may break the environment.
To make it easier to restore the environment when it break, we will list the combinations of libraries that have been confirmed to work.
■ Solution
Please update the library version by referring to the combinations as following.
pip uninstall mp-api pymatgen emmet-core pydantic pydantic_core pydantic-settings
pip install mp-api==0.40.0 pymatgen==2023.12.18 emmet-core==0.84.2 pydantic==2.9.2 pydantic_core==2.23.4 pydantic-settings==2.3.4
■ Confirmed library combinations
python 3.11
| library | version |
| mp-api | 0.45.7 |
| pymatgen | 2025.4.10 |
| emmet-core | 0.84.9rc0 |
| pydantic | 2.10.6 |
| pydantic_core | 2.27.2 |
| pydantic-settings | 2.8.1 |
python 3.9
| library | version |
| mp-api | 0.45.1 |
| pymatgen | 2024.7.18 |
| emmet-core | 0.84.2 |
| pydantic | 2.9.2 |
| pydantic_core | 2.23.4 (warning appears) |
| pydantic-settings | 2.7.1 |
| library | version |
| mp-api | 0.41.2 |
| pymatgen | 2024.6.10 |
| emmet-core | 0.84.2rc2 |
| pydantic | 2.9.2 |
| pydantic_core | 2.23.4 |
| pydantic-settings | 2.3.4 |
| library | version |
| mp-api | 0.40.0 |
| pymatgen | 2023.12.18 |
| emmet-core | 0.84.2 |
| pydantic | 2.9.2 |
| pydantic_core | 2.23.4 |
| pydantic-settings | 2.3.4 |