5

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?
CJD
  • 159
  • 1
  • 7

2 Answers2

4

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.

CJD
  • 159
  • 1
  • 7
  • 2
    this one worked - not sure why but it did - there's definitely too many solutions available online to install python on M1 mac... – Intelligent-Infrastructure Mar 03 '22 at 11:21
  • This doesn't work for me unfortunately. When I do import torch python crashes with this error: ```'ipython' terminated by signal SIGSEGV (Address boundary error)``` – Venkat Mar 10 '22 at 20:17
  • I didn't like the approach of adding `nomkl` just for macOS, and then needing to install torch separately with conda. [This approach](https://stackoverflow.com/a/71640311/1230403) solved it for me using conda alone, hope it helps. – avivr Mar 27 '22 at 21:14
0

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

Lood van Niekerk
  • 833
  • 1
  • 6
  • 5