haasad / PyPardiso

Python interface to the Intel MKL Pardiso library to solve large sparse linear systems of equations
BSD 3-Clause "New" or "Revised" License
136 stars 20 forks source link

PyPardiso can't locate shared library 'mkl_rt.dll' on Windows with MKL version 2021.2.0 #12

Closed haasad closed 3 years ago

haasad commented 3 years ago

On windows pypardiso can't be imported with the newest version of MKL 2021.2.0

FileNotFoundError: Could not find module 'mkl_rt.dll' (or one of its dependencies). Try using the full path with constructor syntax.

There must have been a change in how mkl is packaged between these versions, which throws off pypardiso. This used to work without problems until now. ctypes just found the library in the path, see the relevant code here.

mkl 2020.2 from the defaults channel still works.

cmutel commented 3 years ago

Based on https://github.com/brightway-lca/brightway2-calc/issues/36#issuecomment-853736502, it seems like you could test for both filenames.

haasad commented 3 years ago

see https://github.com/haasad/PyPardisoProject/commit/98701c21ae5d5b9879c51531ace93c2213c89d55