Msys2-packages: fortran update breaks numpy

Created on 3 Jul 2017  路  4Comments  路  Source: msys2/MSYS2-packages

Tried downgrading to the previous versions, which were working fine. (1.11.2 and 1.11.3 IIRC)
Tried building from source again.

I get the same error every time:

$ python2 -c "import numpy"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:/msys64/mingw64/lib/python2.7/site-packages/numpy/__init__.py", line 142, in <module>
    from . import add_newdocs
  File "C:/msys64/mingw64/lib/python2.7/site-packages/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "C:/msys64/mingw64/lib/python2.7/site-packages/numpy/lib/__init__.py", line 8, in <module>
    from .type_check import *
  File "C:/msys64/mingw64/lib/python2.7/site-packages/numpy/lib/type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "C:/msys64/mingw64/lib/python2.7/site-packages/numpy/core/__init__.py", line 26, in <module>
    raise ImportError(msg)
ImportError:
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control).  Otherwise reinstall numpy.

Original error was: DLL load failed: The specified module could not be found.

So it's likely that numpy is fine, but another DLL it depends on isn't.

Not sure which DLL failed to load or how to debug this problem.

Most helpful comment

I'll re-open if the problem persists after the openblas packages are pushed out.

If you don't want to wait that long (and trust me enough 馃槈 ), you can get the updated package from https://gitlab.com/Ede123/bintray

(FWIW: it's not clear to me when issues should be reported against "MSYS2-packages" or "MINGW-packages")

If the package name is prefixed with mingw-* then it's a MINGW-packages issue.
You could also say: If the package is installed in either of the folders mingw32 or mingw64 in the MSYS installation directory.

Some information can also be found in https://github.com/msys2/msys2/wiki/MSYS2-introduction

All 4 comments

Figured out how to workaround it: numpy's multiarray module gets built against an older version of libgfortran: libgfortran-3.dll, so I just untarred it from the older package.
Since rebuilding numpy from source does not help, I guess something else needs rebuilding against the new gcc / fortran libs, then numpy picks up that dependency.
It would be nice if there was a script one could run to figure out which DLLs are broken, similar to what revdep-rebuild does on Gentoo.

I guess you're referring to mingw-w64-python-numpy ?
In that case this is an issue related to https://github.com/Alexpux/MINGW-packages and should be fixed with https://github.com/Alexpux/MINGW-packages/pull/2682 (libopenblas, used by numpy, was linked against the old libgfortran-3.dll)

I guess you're referring to mingw-w64-python-numpy ?
Yes.

This sounds exactly like the problem I described so I am closing this issue.
I'll re-open if the problem persists after the openblas packages are pushed out.

(FWIW: it's not clear to me when issues should be reported against "MSYS2-packages" or "MINGW-packages")

I'll re-open if the problem persists after the openblas packages are pushed out.

If you don't want to wait that long (and trust me enough 馃槈 ), you can get the updated package from https://gitlab.com/Ede123/bintray

(FWIW: it's not clear to me when issues should be reported against "MSYS2-packages" or "MINGW-packages")

If the package name is prefixed with mingw-* then it's a MINGW-packages issue.
You could also say: If the package is installed in either of the folders mingw32 or mingw64 in the MSYS installation directory.

Some information can also be found in https://github.com/msys2/msys2/wiki/MSYS2-introduction

Was this page helpful?
0 / 5 - 0 ratings