Installation problem on MacOS

Don_Spong: <p>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?</p>
<p>(pytorch) dsp@dspfusionmbpr ~ % conda install pytorch::pytorch torchvision torchaudio -c pytorch<br>
Channels:</p>
<ul>
<li>pytorch</li>
<li>intel</li>
<li>defaults<br>
Platform: osx-64<br>
Collecting package metadata (repodata.json): done<br>
Solving environment: | warning  libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE<br>
failed</li>
</ul>
<p>LibMambaUnsatisfiableError: Encountered problems while solving:</p>
<ul>
<li>nothing provides requested pytorch::pytorch</li>
<li>package torchaudio-2.0.2-py311_cpu requires pytorch 2.0.1, but none of the providers can be installed</li>
</ul>
<p>Could not solve for environment specs<br>
The following packages are incompatible<br>
├─ _anaconda_depends is installable with the potential options<br>
│  ├─ _anaconda_depends [2023.06|2023.07|2023.09|2024.02] would require<br>
│  │  └─ blas [* openblas|1.0 openblas], which can be installed;<br>
│  ├─ _anaconda_depends [2018.12|2019.03|…|5.3.1] would require<br>
│  │  └─ python 2.7.* , which can be installed;<br>
│  ├─ _anaconda_depends [2018.12|2019.03|…|5.3.0] would require<br>
│  │  └─ python 3.6.* , which can be installed;<br>
│  ├─ _anaconda_depends [2018.12|2019.03|…|5.3.1] would require<br>
│  │  └─ python [3.7.* |&gt;=3.7,&lt;3.8.0a0 ], which can be installed;<br>
│  ├─ _anaconda_depends [2020.02|2020.07|…|2024.02] would require<br>
│  │  └─ python [3.8.* |&gt;=3.8,&lt;3.9.0a0 ], which can be installed;<br>
│  ├─ _anaconda_depends [2021.11|2022.05|…|2024.02] would require<br>
│  │  └─ python [3.9.* |&gt;=3.9,&lt;3.10.0a0 ], which can be installed;<br>
│  ├─ _anaconda_depends [2022.10|2023.03|…|2024.02] would require<br>
│  │  └─ python &gt;=3.10,&lt;3.11.0a0 , which can be installed;<br>
│  └─ _anaconda_depends [5.0.0|5.0.1|5.1.0|5.2.0] would require<br>
│     └─ python 3.5.* , which can be installed;<br>
├─ pin-1 is not installable because it requires<br>
│  └─ python 3.11.* , which conflicts with any installable versions previously reported;<br>
├─ pytorch does not exist (perhaps a typo or a missing channel);<br>
└─ torchaudio is installable with the potential options<br>
├─ torchaudio [0.10.0|0.10.1|…|0.9.1] would require<br>
│  └─ python &gt;=3.6,&lt;3.7.0a0 , which can be installed;<br>
├─ torchaudio [0.10.0|0.10.1|…|0.9.1] would require<br>
│  └─ python &gt;=3.7,&lt;3.8.0a0 , which can be installed;<br>
├─ torchaudio [0.10.0|0.10.1|…|2.2.1] would require<br>
│  └─ python &gt;=3.8,&lt;3.9.0a0 , which can be installed;<br>
├─ torchaudio [0.10.0|0.10.1|…|2.2.1] would require<br>
│  └─ python &gt;=3.9,&lt;3.10.0a0 , which can be installed;<br>
├─ torchaudio [0.11.0|0.12.0|…|2.2.1] would require<br>
│  └─ python &gt;=3.10,&lt;3.11.0a0 , which can be installed;<br>
├─ torchaudio 0.5.1 would require<br>
│  └─ python &gt;=3.5,&lt;3.6.0a0 , which can be installed;<br>
├─ torchaudio [2.0.2|2.1.0|2.1.1|2.1.2] would require<br>
│  └─ pytorch [2.0.1 |2.1.0 |2.1.1 |2.1.2 ] with the potential options<br>
│     ├─ pytorch [2.0.1|2.1.0|…|2.2.1] would require<br>
│     │  └─ python &gt;=3.10,&lt;3.11.0a0 , which can be installed;<br>
│     ├─ pytorch [2.0.1|2.1.0|…|2.2.1] would require<br>
│     │  └─ blas [* mkl|1.0 mkl], which conflicts with any installable versions previously reported;<br>
│     ├─ pytorch [2.0.1|2.1.0|…|2.2.1] would require<br>
│     │  └─ python &gt;=3.8,&lt;3.9.0a0 , which can be installed;<br>
│     └─ pytorch [2.0.1|2.1.0|…|2.2.1] would require<br>
│        └─ python &gt;=3.9,&lt;3.10.0a0 , which can be installed;<br>
├─ torchaudio [2.2.0|2.2.1] would require<br>
│  └─ pytorch [2.2.0 |2.2.1 ] with the potential options<br>
│     ├─ pytorch [2.0.1|2.1.0|…|2.2.1], which can be installed (as previously explained);<br>
│     ├─ pytorch [2.0.1|2.1.0|…|2.2.1], which cannot be installed (as previously explained);<br>
│     ├─ pytorch [2.0.1|2.1.0|…|2.2.1], which can be installed (as previously explained);<br>
│     ├─ pytorch [2.0.1|2.1.0|…|2.2.1], which can be installed (as previously explained);<br>
│     └─ pytorch [2.2.0|2.2.1] would require<br>
│        └─ python &gt;=3.12,&lt;3.13.0a0 , which can be installed;<br>
└─ torchaudio [2.2.0|2.2.1] would require<br>
└─ python &gt;=3.12,&lt;3.13.0a0 , which can be installed.</p>

pypdeveloper: <p>Try installing with pip instead of conda, usually fixes things for me.<br>
<code>pip install torch torchvision torchaudio</code></p>

Don_Spong: <p>Thanks, that solved my problem.</p>

Abhishek_Nigam: <p>When i m running this command: pip install torch torchvision torchaudio<br>
I am getting below error:</p>
<p>ERROR: Could not find a version that satisfies the requirement torch (from versions: none)<br>
ERROR: No matching distribution found for torch</p>
<p>Pls help. Thanks!</p>

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

Anull: <p>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!</p>
<pre><code class="lang-auto">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
</code></pre>

ptrblck: <p>Mac on x86 is deprecated as described <a href="https://discuss.pytorch.org/t/why-no-macosx-x86-64-build-after-torch-2-2-2-cp39-none-macosx-10-9-x86-64-whl/204546/2">here</a>.</p>

Anull: <p>Hey <a class="mention" href="/u/ptrblck">@ptrblck</a>, thanks. You saved me some trouble!</p>