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