brew install pytorch code example
Example 1: conda install pytorch
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
Example 2: brew install pip
$ sudo pip install --upgrade pip
Example 3: brew install ubuntu
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Example 4: mac install pytorch 3.6
conda install pytorch torchvision -c pytorch