Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not import pymatgen modules #24

Open
thienbinh92 opened this issue Jul 17, 2021 · 3 comments
Open

Can not import pymatgen modules #24

thienbinh92 opened this issue Jul 17, 2021 · 3 comments

Comments

@thienbinh92
Copy link

Hi, I install pymatgen and your code on my MacBook air. Then I ran the create_interface.py in the example file. But it says:

ModuleNotFoundError: No module named 'pymatgen.util.coord_utils'
ImportError: cannot import name 'Structure' from 'pymatgen' (unknown location)

Can you tell me how to solve these problems?
Many thanks!

@mkhorton
Copy link

Hi @thienbinh92, MPInterfaces needs to be updated to support the latest pymatgen (v2022). Until then, you can install an older version of pymatgen (v2021.x).

@mkhorton
Copy link

Note I am not a maintainer/developer of MPInterfaces, I just saw your question so thought I would respond.

@mkhorton
Copy link

Alternatively, you can just change the import yourself, and it should work, e.g.

from pymatgen import Structure

should be changed to its canonical import:

from pymatgen.core.structure import Structure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants