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)


CUDA is not supported on Mac-OSX - that is why your install is not working. You will see that if you go to the pytorch website.

Try the install without cudatoolkit.