Installation problem on MacOS

On my Intel-based MacBook Pro (Sonoma 14.3) I’ve created an environment for PyTorch under Conda (which comes with Python 3.11.5) and am trying to install PyTorch using the command suggested on the PyTorch home page (conda install pytorch::pytorch torchvision torchaudio -c pytorch). During the “Solving environment” step I run into problems, as indicated below from my screen dump. Any suggestions as to what I need to do to fix this and succeed in my PyTorch install?

(pytorch) dsp@dspfusionmbpr ~ % conda install pytorch::pytorch torchvision torchaudio -c pytorch
Channels:

  • pytorch
  • intel
  • defaults
    Platform: osx-64
    Collecting package metadata (repodata.json): done
    Solving environment: | warning libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE
    failed

LibMambaUnsatisfiableError: Encountered problems while solving:

  • nothing provides requested pytorch::pytorch
  • package torchaudio-2.0.2-py311_cpu requires pytorch 2.0.1, but none of the providers can be installed

Could not solve for environment specs
The following packages are incompatible
├─ _anaconda_depends is installable with the potential options
│ ├─ _anaconda_depends [2023.06|2023.07|2023.09|2024.02] would require
│ │ └─ blas [* openblas|1.0 openblas], which can be installed;
│ ├─ _anaconda_depends [2018.12|2019.03|…|5.3.1] would require
│ │ └─ python 2.7.* , which can be installed;
│ ├─ _anaconda_depends [2018.12|2019.03|…|5.3.0] would require
│ │ └─ python 3.6.* , which can be installed;
│ ├─ _anaconda_depends [2018.12|2019.03|…|5.3.1] would require
│ │ └─ python [3.7.* |>=3.7,<3.8.0a0 ], which can be installed;
│ ├─ _anaconda_depends [2020.02|2020.07|…|2024.02] would require
│ │ └─ python [3.8.* |>=3.8,<3.9.0a0 ], which can be installed;
│ ├─ _anaconda_depends [2021.11|2022.05|…|2024.02] would require
│ │ └─ python [3.9.* |>=3.9,<3.10.0a0 ], which can be installed;
│ ├─ _anaconda_depends [2022.10|2023.03|…|2024.02] would require
│ │ └─ python >=3.10,<3.11.0a0 , which can be installed;
│ └─ _anaconda_depends [5.0.0|5.0.1|5.1.0|5.2.0] would require
│ └─ python 3.5.* , which can be installed;
├─ pin-1 is not installable because it requires
│ └─ python 3.11.* , which conflicts with any installable versions previously reported;
├─ pytorch does not exist (perhaps a typo or a missing channel);
└─ torchaudio is installable with the potential options
├─ torchaudio [0.10.0|0.10.1|…|0.9.1] would require
│ └─ python >=3.6,<3.7.0a0 , which can be installed;
├─ torchaudio [0.10.0|0.10.1|…|0.9.1] would require
│ └─ python >=3.7,<3.8.0a0 , which can be installed;
├─ torchaudio [0.10.0|0.10.1|…|2.2.1] would require
│ └─ python >=3.8,<3.9.0a0 , which can be installed;
├─ torchaudio [0.10.0|0.10.1|…|2.2.1] would require
│ └─ python >=3.9,<3.10.0a0 , which can be installed;
├─ torchaudio [0.11.0|0.12.0|…|2.2.1] would require
│ └─ python >=3.10,<3.11.0a0 , which can be installed;
├─ torchaudio 0.5.1 would require
│ └─ python >=3.5,<3.6.0a0 , which can be installed;
├─ torchaudio [2.0.2|2.1.0|2.1.1|2.1.2] would require
│ └─ pytorch [2.0.1 |2.1.0 |2.1.1 |2.1.2 ] with the potential options
│ ├─ pytorch [2.0.1|2.1.0|…|2.2.1] would require
│ │ └─ python >=3.10,<3.11.0a0 , which can be installed;
│ ├─ pytorch [2.0.1|2.1.0|…|2.2.1] would require
│ │ └─ blas [* mkl|1.0 mkl], which conflicts with any installable versions previously reported;
│ ├─ pytorch [2.0.1|2.1.0|…|2.2.1] would require
│ │ └─ python >=3.8,<3.9.0a0 , which can be installed;
│ └─ pytorch [2.0.1|2.1.0|…|2.2.1] would require
│ └─ python >=3.9,<3.10.0a0 , which can be installed;
├─ torchaudio [2.2.0|2.2.1] would require
│ └─ pytorch [2.2.0 |2.2.1 ] with the potential options
│ ├─ pytorch [2.0.1|2.1.0|…|2.2.1], which can be installed (as previously explained);
│ ├─ pytorch [2.0.1|2.1.0|…|2.2.1], which cannot be installed (as previously explained);
│ ├─ pytorch [2.0.1|2.1.0|…|2.2.1], which can be installed (as previously explained);
│ ├─ pytorch [2.0.1|2.1.0|…|2.2.1], which can be installed (as previously explained);
│ └─ pytorch [2.2.0|2.2.1] would require
│ └─ python >=3.12,<3.13.0a0 , which can be installed;
└─ torchaudio [2.2.0|2.2.1] would require
└─ python >=3.12,<3.13.0a0 , which can be installed.

Try installing with pip instead of conda, usually fixes things for me.
pip install torch torchvision torchaudio

Thanks, that solved my problem.

1 Like

When i m running this command: pip install torch torchvision torchaudio
I am getting below error:

ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch

Pls help. Thanks!

Hey, I was also facing this same issue.
Found out in the docs that the python version should be somewhere around Python 3.9 - 3.12.
Downgraded my python version to 3.9 and it’s working fine now.

Hey, same issue. I have the right version of Python - Python 3.11.12. I’m on a Mac with Intel and using 64-bit python as well. I’m still getting this error when trying to install torch, any help would be appreciated!

ERROR: Could not find a version that satisfies the requirement torch===2.7.0 (from versions: 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2)

ERROR: No matching distribution found for torch===2.7.0

Mac on x86 is deprecated as described here.

Hey @ptrblck, thanks. You saved me some trouble!

1 Like