Steps to install PyTorch on Mac with Anaconda
conda create -n <env_name> python=3.10 -y
conda activate <env_name>
pip install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cpu
python -c "import torch; print(torch.__version__);print(torch.tensor([4,2,0], device='mps'))"