Unable to install pytorch and cudatoolkit

I tried running this below command inside my conda environment (python version 3.10.10) on macbook (M1 Pro chip)
conda install pytorch==1.7.1 torchaudio==0.7.2 cudatoolkit=10.1 -c pytorch

And I got this error

===================================================================

PackagesNotFoundError: The following packages are not available from current channels:

  • cudatoolkit=10.1

Current channels: (These channels r actually links I am unable to post more than 2 links because I am a new user)

I don’t think your Macbook supports CUDA and I also don’t think the MPS backend was already available in torch==1.7.1. Did you try to install the latest stable or nightly release instead?