python – Error when installing PyTorch with CUDA support in a Conda environment on Mac

I’m trying to create a Conda environment and install the required dependencies to fine-tune a model, following the provided steps. However, I encounter an error when attempting to install PyTorch with CUDA support.

The steps:

  1. Clone this repository
  2. conda create -n <environment-name> python==3.9
  3. conda activate <environment-name>
  4. Install torch (tested for >=1.7.1 and <=1.11.0) and torchvision (tested for >=0.8.2 and <=0.12). May vary with your system. Please check at: pytorch.org/get-started/previous-versions/.
  • e.g.: pip install torch==1.11.0+cu115 torchvision==0.12.0+cu115 --extra-index-url https://download.pytorch.org/whl/cu115

I tried following the steps but encountered the following error:

ERROR: Could not find a version that satisfies the requirement torch==1.11.0+cu115 (from versions: 2.0.0, 2.0.1)
ERROR: No matching distribution found for torch==1.11.0+cu115

Additional information
Macbook M2 Pro (Ventura 13.5)

>>> conda list | grep "python"

python                    3.9.17               hb885b13_0  

Has anyone experienced this before?

Thanks in advance!

Read more here: Source link