Skip to content

Commit

Permalink
fix: numpy version <1.24 to fix the following error from pymatgen
Browse files Browse the repository at this point in the history
  File "/export/compute/software/rupy-env-2022.12.15/lib/python3.8/site-packages/custodian/vasp/handlers.py", line 22, in <module>
    from pymatgen.io.vasp import Poscar, VaspInput, Incar, Kpoints, Vasprun, \
  File "/export/compute/software/rupy-env-2022.12.15/lib/python3.8/site-packages/pymatgen/__init__.py", line 54, in <module>
    from .ext.matproj import MPRester
  File "/export/compute/software/rupy-env-2022.12.15/lib/python3.8/site-packages/pymatgen/ext/matproj.py", line 33, in <module>
    from pymatgen.core.surface import get_symmetrically_equivalent_miller_indices
  File "/export/compute/software/rupy-env-2022.12.15/lib/python3.8/site-packages/pymatgen/core/surface.py", line 31, in <module>
    from scipy.spatial.distance import squareform
  File "/export/compute/software/rupy-env-2022.12.15/lib/python3.8/site-packages/scipy/spatial/__init__.py", line 99, in <module>
    from .kdtree import *
  File "/export/compute/software/rupy-env-2022.12.15/lib/python3.8/site-packages/scipy/spatial/kdtree.py", line 8, in <module>
    import scipy.sparse
  File "/export/compute/software/rupy-env-2022.12.15/lib/python3.8/site-packages/scipy/sparse/__init__.py", line 229, in <module>
    from .base import *
  File "/export/compute/software/rupy-env-2022.12.15/lib/python3.8/site-packages/scipy/sparse/base.py", line 8, in <module>
    from .sputils import (isdense, isscalarlike, isintlike,
  File "/export/compute/software/rupy-env-2022.12.15/lib/python3.8/site-packages/scipy/sparse/sputils.py", line 16, in <module>
    supported_dtypes = [np.typeDict[x] for x in supported_dtypes]
  File "/export/compute/software/rupy-env-2022.12.15/lib/python3.8/site-packages/scipy/sparse/sputils.py", line 16, in <listcomp>
    supported_dtypes = [np.typeDict[x] for x in supported_dtypes]
  File "/export/compute/software/rupy-env-2022.12.15/lib/python3.8/site-packages/numpy/__init__.py", line 284, in __getattr__
    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'typeDict'
[user-o17l4s6nzm@master-sof-20210527-cluster-001 espresso-band-structure-purge-Gic8JcJugEXBac6BW]$ source /export/compute/software/rupy-env-2022.12.15/bin/activate
(rupy-env-2022.12.15) [user-o17l4s6nzm@master-sof-20210527-cluster-001 espresso-band-structure-purge-Gic8JcJugEXBac6BW]$ pip list
  • Loading branch information
timurbazhirov committed Jan 22, 2023
1 parent 7c5d1c5 commit f19e40a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ package_dir =
= .
packages = find:
python_requires = >= 3.6

# # Numpy 1.24.X causes - AttributeError: module 'numpy' has no attribute 'typeDict' - error
install_requires =
munch==2.5.0
numpy<=1.23.4
pymatgen==2022.11.7
ase==3.17.0
esse>=2020.10.19
Expand Down

0 comments on commit f19e40a

Please sign in to comment.