在 mac M1 上导入 torch 后出现分段错误 python
我很难在我的 Mac M1 芯片上安装 pytorch。
我使用 mkl
这里
现在我这样做:
conda install ipykernel jupyter numpy pandas matplotlib nomkl
pip install torch torchvision
python
import torch
并且我得到:
zsh:segmentation fault python
当我运行 jupyter 时,从终端 - 内核只是崩溃了
如何修复?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是因为 numpy 依赖冲突,尝试这个:
首先导入 numpy,然后 torch:
import numpy;进口火炬
its because of a numpy dependency conflict, try this one:
first import numpy, and then torch:
import numpy; import torch
我刚刚遇到这个错误,mac m1,python3.8 & pyTorch 1.14。
通过此命令安装:
pip3 install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cpu
也遇到这个错误。
以下命令帮助我解决问题
conda install "libblas==mkl"
我引用了这篇文章:
https://github.com/pytorch/pytorch/issues/66782
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