sisl: numpy.ndarray binary incompatibility error in environments with `numpy<1.20`

After upgrading sisl to 0.11.0 I can not import the package anymore.

The call: from sisl._indices import indices_le returns: ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject

OS Fedora 31 Python 3.7.6 numpy 1.17.5 (and others, see below)

Tried to reinstall numpy (same version) as suggested on the web, but couldn’t solve the problem. I am bound to this old numpy version due to other packages requirement, but I also tried in a new environment (same python version) numpy 1.18 and 1.19. Got the same error. Version of numpy 1.20, on the contrary, works.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 33 (23 by maintainers)

Commits related to this issue

Most upvoted comments

Yes, you are correct, it is basically the same as you suggest.

The only doubt I have is: does oldest-supported-numpy consider that sisl only supports >=1.13 or can it try to use an even older version? Would it matter if it picked an older version? I.e., is the requirement for >=1.13 a build time requirement or just a requirement for usage (say because a specific method was introduced in 1.13)?

I think I just fixed this. sisl only has a build requirement for the oldest numpy version available for the current python version. And once runned it requires a specific version. I just committed f364af06be2aa1854d8205bcad24c84efc598db8 which removed my extraneous requirement in requires! That variable is only a build requirement.