Can't import pymatgen.core "No module named 'pymatgen.core'"

1.8k Views Asked by At

I've used pip install pymatgen with Python 3.9.1 on Windows 10 to install pymatgen, but I'm getting the following error:

    Traceback (most recent call last):
      File "D:\code\pymatgen\pymatgen.py", line 1, in <module>
    import pymatgen.core as mg
      File "D:\code\pymatgen\pymatgen.py", line 1, in <module>
        import pymatgen.core as mg
    ModuleNotFoundError: No module named 'pymatgen.core'; 'pymatgen' is not a package

I have also tried to install the previous 2 versions but still getting the same error though I can already see it in the pip list

pymatgen                          2022.3.22

What am I missing?

1

There are 1 best solutions below

0
On

Maybe try using conda ? if this doesn't work then there is definitely some dependencies issue

https://pymatgen.org/installation.html