4

I struggled to install pytorch on my Mac M1 chip.

I fixed the previous issue with mkl here

Now I do:

conda install ipykernel jupyter numpy pandas matplotlib nomkl 
pip install torch torchvision
python
import torch

and I get:

zsh:segmentation fault  python 

from terminal, when I run jupyter - the kernel just crashes

how to fix it?

2 Answers2

1

its because of a numpy dependency conflict, try this one: first import numpy, and then torch:

import numpy; import torch

Reza SA
  • 29
  • 1
  • 7
0

i just met this error, mac m1, python3.8 & pyTorch 1.14.

installed from this command:

pip3 install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cpu

and meet this error too.

The following command help's me to solve the problem

conda install "libblas==mkl"

I refered this article: https://github.com/pytorch/pytorch/issues/66782