conda env broken after installing pytorch on M1 - Intel MKL FATAL ERROR

I installed pytorch on my M1 mac book, following some instructions on-line (via conda command). Then my whole environment got corrupted. Whenever I try to import some library (pandas, numpy, whatever) I get this:

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.
  1. How can I fix it?
  2. How can I install pytorch successully?

Upvotes: 5

Views: 4624

Answers (2)

Lood van Niekerk
Lood van Niekerk

Reputation: 1121

Disclaimer: The below hasn't worked for me; I just ended up using pip inside a conda env :(

Conda's website includes a fix:

https://docs.anaconda.com/mkl-optimizations/index.html#uninstalling-mkl

To opt out, run conda install nomkl and then use conda install <packages>

Also:

If you are using OS X or Linux, have already installed these packages or already installed all of Anaconda, and wish to switch away from MKL, use the command conda install nomkl numpy scipy scikit-learn numexpr followed by conda remove mkl mkl-service

Upvotes: 0

CJD
CJD

Reputation: 159

Here is what worked for me a few weeks ago:

  1. Create a new conda environment and activate it.
  2. conda install ipykernel jupyter numpy pandas matplotlib nomkl (the key part being to include nomkl and don't include PyTorch).
  3. pip install torch torchvision

I could not get step 3 to work using conda (possibly related issue).

This doesn't feel like a robust solution (mixing conda and pip), but the environment has worked for me the past few weeks.

Upvotes: 4

Related Questions