Intel MKL FATAL ERROR: This system does not meet the minimum requirements for use of the Intel(R) Math Kernel Library

Viewed 3576

I am running PyTorch in Python 3.8.5 on a M1 Macbook Pro, and I get these error messages:

Intel MKL FATAL ERROR: This system does not meet the minimum requirements for use of the Intel(R) Math Kernel Library.
The processor must support the Intel(R) Supplemental Streaming SIMD Extensions 3 (Intel(R) SSSE3) instructions.
The processor must support the Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) instructions.
The processor must support the Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions.

What do they mean, and what can I do to resolve them?

3 Answers

I ran into this error when trying to install an intel env via conda on an M1 mac. With a native env (osx-arm64) it worked, but I needed an intel env (osx-64) for some other reason.

I managed to resolve this error by downgrading mkl to version 2021 instead of version 2022 which was installed as a transitive dependency.

I simply added this to my environment.yml and re-installed it:

- mkl < 2022

Note that if your conda is M1 native (i.e. has a platform of osx-arm64), and you want to install an intel environment, you need to do it like so:

CONDA_SUBDIR=osx-64 conda env update -f environment.yml

The env also contains pytorch, and this approach allowed me to install everything via conda, instead of relying on a hybrid of conda/pip like the other solutions.

As @CJD suggested installing PyTorch using pip apparently solves the problem, even on a Mac with M1 or newer versions M1 Pro and M1 Max [Tested]. Using pip will install PyTorch without MKL.

Steps:

  1. Uninstall PyTorch using conda (if it is installed): conda remove pytorch
  2. Install it using pip: pip install torch .

Check the following link for further details: https://github.com/pytorch/pytorch/issues/71022

I was getting the same error messages for any package I tried to import (ie, numpy, pandas, etc). I am running OSX Monterey on a late 2008 macbook 5,1 through opencore. The key bit for me was just installing nomkl as per CJD's comment above. It didn't matter whether it was a new or base environment. I don't really understand what the problem was or the possible limitations of the fix, but it is working now.

Related