Installing PyTorch fails on MacOS

Wesley_Neill: <p>Hi there,</p>
<p>I’m a windows guy but my employer just gave me a new Mac to work on. Following the official “Start Locally” steps for Mac fails with some sort of compatibility error:</p>
<pre><code class="lang-auto">Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                                                                                                                                      

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -&gt; Available versions

Package pytorch conflicts for:
torchaudio -&gt; pytorch[version='1.2.0|1.3.0|1.3.1|1.4.0|1.5.0|1.5.1|1.6.0|1.7.0|1.7.1']
pytorch

Package numpy-base conflicts for:
torchvision -&gt; numpy[version='&gt;=1.11'] -&gt; numpy-base[SHIT TON OF VERSIONS]
pytorch -&gt; numpy[version='&gt;=1.11'] -&gt; numpy-base[SHIT TON OF VERSIONS]
</code></pre>
<p>I thought that following the directions that state the addition of <code>-c=conda-forge</code> would fix the problem but they do not.</p>
<p>I next tried to downgrade my version of python to 3.8, but the problem persists. This is a brand new, untouched environment.</p>

Brando_Miranda: <p>did you ever manage to solve this?</p>
<p>I am also having this fail:</p>
<pre><code class="lang-auto">(synthesis) miranda9@Brandos-MBP ~ % conda install pytorch torchvision torchaudio -c pytorch
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: - 
Found conflicts! Looking for incompatible packages.                                                                                                                                                                                                                                                                   failed                                                                                                                                                                                                                                                                                                                    

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -&gt; Available versions

Package pytorch conflicts for:
torchaudio -&gt; pytorch[version='1.2.0|1.3.0|1.3.1|1.4.0|1.5.0|1.5.1|1.6.0|1.7.0|1.7.1|1.8.0|1.8.1|1.9.0']
torchvision -&gt; pytorch[version='1.2.0|1.3.0|1.3.1|1.4.0|1.5.0|1.5.1|1.6.0|1.7.0|1.7.1|1.8.0|1.8.1|1.9.0|&gt;=1.1.0|&gt;=1.0.0|&gt;=0.4|&gt;=0.3|&gt;=0.2|1.7.1.*|1.3.1.*']
pytorch

Package six conflicts for:
torchvision -&gt; six
pytorch -&gt; mkl-service[version='&gt;=2,&lt;3.0a0'] -&gt; six
</code></pre>
<p><a class="mention" href="/u/smth">@smth</a> Perhaps you’d know?</p>
<p>I just started a brand new env with python 3.9 and only numpy installed. Why can’t I install pytorch 1.9 the current newest version?</p>
<hr>
<p>cross posted:</p>
<ul>
<li><a href="https://www.reddit.com/r/pytorch/comments/o1hwgv/installing_pytorch_fails_on_macos_with_brand_new/" rel="noopener nofollow ugc">https://www.reddit.com/r/pytorch/comments/o1hwgv/installing_pytorch_fails_on_macos_with_brand_new/</a></li>
<li>SO: <a href="https://stackoverflow.com/questions/68010933/unable-to-install-pytorch-on-mac-os-x-from-scratch-due-to-pytorch-package-confli" class="inline-onebox" rel="noopener nofollow ugc">python - Unable to install Pytorch on Mac OS X from scratch due to Pytorch package conflicts with Conda - how to fix? - Stack Overflow</a>
</li>
</ul>

Brando_Miranda: <p>Ultimately this is what solved my problem:</p>
<pre><code class="lang-auto">conda install -y pytorch torchvision torchaudio -c pytorch -c conda-forge
</code></pre>
<p><a class="mention" href="/u/smth">@smth</a> sorry to ping you again but why does the official pytorch installation not include the conda-forge channel? It seems I always have issues without it…at least letting you know. Hope this helps!</p>