Wrong version (1.10.2) gets installed for me when I run conda install pytorch -c pytorch-nightly
.
To fix, install the latest pytorch version from the stable channel, then manually download package
for your python version, and install it over the current pytorch. Newest Pytorch Nightly releases here:
Anaconda: Pytorch Nightly Files.
First make sure you are using M1 arm version of Anaconda. If not, get it here:
Anaconda: Downloads.
Then,
conda create -n mps python=3.10.4
conda activate mps
conda install pytorch torchvision -c pytorch
curl -L 'https://anaconda.org/pytorch-nightly/pytorch/1.12.0.dev20220518/download/osx-arm64/pytorch-1.12.0.dev20220518-py3.10_0.tar.bz2' -o 'pytorch-1.12.0.dev20220518-py3.10_0.tar.bz2'
conda install ./pytorch-1.12.0.dev20220518-py3.10_0.tar.bz2
Don't forget to select the right interpreter! :)
Using the MPS device
PyTorch Blog: M1 support announcement
Installing a compressed package
Apple's page on MPS
:)