1 miniconda 安装
使用清华镜像:https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/
下载sh
打开终端进行安装,执行
bash miniconda*.sh
同意相关协议安装即可
2 配置清华镜像
清华官方镜像站教程:https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/
3 下载Pytorch
由于配置清华镜像源,所以需要指定Pytorch的地址:
conda activate env_name # 激活环境
pip3 install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cpu
安装测试
$ conda activate myenv
$ python
>>> import torch
>>>
参考
Mac(M系列芯片)安装Anaconda和Pytorch:https://zhuanlan.zhihu.com/p/567263074