Torchaudio breaks 1.10.0.dev20210624 nightly-build install (conda on linux)

username: KFrank
cooked: <p>Hi Forum!</p>
<p>An attempt to install today’s (6/24/21) nightly build failed.  I am using<br>
conda on linux.</p>
<p>The attempt produced a bunch of package conflicts, but torchaudio<br>
seemed to be part of the problem.  I then tried installing without<br>
torchaudio and it mostly worked, but numpy was missing.  After<br>
installing numpy by hand (with conda), things appear okay (but<br>
without torchaudio.)</p>
<p>Here are the two reported torchaudio conflicts:</p>
<pre><code class="lang-nohighlight">torchaudio -&gt; python[version='&gt;=3.9,&lt;3.10.0a0'] -&gt; libstdcxx-ng[version='&gt;=7.2.0|&gt;=7.3.0|&gt;=7.5.0'
torchaudio -&gt; pytorch==1.10.0.dev20210618
</code></pre>
<p>I attempted the install on a newly-created and cleaned conda<br>
environment.</p>
<p>Here is the install command that failed:</p>
<pre><code class="lang-nohighlight">(nightly) user@server:~$ conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch-nightly
</code></pre>
<p>and the install command that succeeded:</p>
<pre><code class="lang-nohighlight">(nightly) user@server:~$ conda install pytorch torchvision cudatoolkit=10.2 -c pytorch-nightly
</code></pre>
<p>Here is the numpy error (before installing numpy by hand) when<br>
running the newly-installed nightly build without torchaudio:</p>
<pre><code class="lang-auto">&gt;&gt;&gt; import torch
/home/user/miniconda3/envs/nightly/lib/python3.9/site-packages/torch/package/_directory_reader.py:17: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at  /opt/conda/conda-bld/pytorch_1624518427672/work/torch/csrc/utils/tensor_numpy.cpp:68.)
  _dtype_to_storage = {data_type(0).dtype: data_type for data_type in _storages}
&gt;&gt;&gt; import numpy
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
ModuleNotFoundError: No module named 'numpy'
</code></pre>
<p>For completeness, here is the full result of the failed install attempt<br>
that included torchaudio:</p>
<pre><code class="lang-nohighlight">user@server:~$ conda create -n nightly
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/user/miniconda3/envs/nightly



Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate nightly
#
# To deactivate an active environment, use
#
#     $ conda deactivate

user@server:~$ conda activate nightly
(nightly) user@server:~$ conda list
# packages in environment at /home/user/miniconda3/envs/nightly:
#
# Name                    Version                   Build  Channel
(nightly) user@server:~$ conda clean --all
Cache location:
There are no tarballs to remove
WARNING: /home/user/.conda/pkgs does not exist
Cache location:
There are no unused packages to remove
(nightly) user@server:~$ conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch-nightly
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 libstdcxx-ng conflicts for:
torchvision -&gt; python[version='&gt;=3.9,&lt;3.10.0a0'] -&gt; libstdcxx-ng[version='&gt;=7.2.0|&gt;=7.5.0']
torchvision -&gt; libstdcxx-ng[version='&gt;=5.4.0|&gt;=7.3.0']
pytorch -&gt; libstdcxx-ng[version='&gt;=5.4.0|&gt;=7.3.0']
torchaudio -&gt; python[version='&gt;=3.9,&lt;3.10.0a0'] -&gt; libstdcxx-ng[version='&gt;=7.2.0|&gt;=7.3.0|&gt;=7.5.0']
pytorch -&gt; ninja -&gt; libstdcxx-ng[version='&gt;=7.2.0|&gt;=7.5.0']
cudatoolkit=10.2 -&gt; libstdcxx-ng[version='&gt;=7.3.0']

Package pytorch conflicts for:
pytorch
torchvision -&gt; pytorch[version='1.1.*|1.10.0.dev20210624|1.9.0.dev20210415|1.9.0.dev20210217|1.8.0.dev20210208|1.8.0.dev20210111|1.7.1.*|1.3.1.*|1.2.0.*|&gt;=0.4|&gt;=0.3']
torchaudio -&gt; pytorch==1.10.0.dev20210618

Package cudatoolkit conflicts for:
torchvision -&gt; pytorch==1.8.0.dev20210208 -&gt; cudatoolkit[version='10.0.*|&gt;=11.0,&lt;11.0.221|9.2.*|&gt;=10.1.243,&lt;10.2.0a0|&gt;=8.0,&lt;8.1.0a0|9.0.*|8.0.*|7.5.*']
pytorch -&gt; cudnn[version='&gt;=7.6,&lt;8.0a0'] -&gt; cudatoolkit[version='&gt;=10.0,&lt;10.1|&gt;=9.0,&lt;9.1']
pytorch -&gt; cudatoolkit[version='10.0.*|&gt;=10.0.130,&lt;10.1.0a0|&gt;=10.1,&lt;10.2|&gt;=10.2,&lt;10.3|&gt;=11.1,&lt;11.2|&gt;=11.2,&lt;11.3|&gt;=11.0,&lt;11.0.221|&gt;=11.0,&lt;11.1|&gt;=9.2,&lt;9.3|&gt;=10.1.243,&lt;10.2.0a0|&gt;=9.2,&lt;9.3.0a0|9.2.*|&gt;=9.0,&lt;9.1.0a0|&gt;=8.0,&lt;8.1.0a0|9.0.*|8.0.*|7.5.*']
torchvision -&gt; cudatoolkit[version='&gt;=10.0.130,&lt;10.1.0a0|&gt;=10.1,&lt;10.2|&gt;=10.2,&lt;10.3|&gt;=11.1,&lt;11.2|&gt;=11.2,&lt;11.3|&gt;=11.0,&lt;11.1|&gt;=9.2,&lt;9.3|&gt;=9.2,&lt;9.3.0a0|&gt;=9.0,&lt;9.1.0a0']
cudatoolkit=10.2

Package cudnn conflicts for:
pytorch -&gt; cudnn[version='5.1.*|6.0.*|&gt;=7.0.0,&lt;=8.0a0|&gt;=7.0.5,&lt;=8.0a0|&gt;=7.1.0,&lt;=8.0a0|&gt;=7.1.3,&lt;8.0a0|&gt;=7.3.0,&lt;=8.0a0|&gt;=7.6,&lt;8.0a0|&gt;=7.6.5,&lt;8.0a0|&gt;=7.6.4,&lt;8.0a0|&gt;=7.3.1,&lt;8.0a0|&gt;=7.1.2,&lt;=8.0a0']
torchvision -&gt; pytorch=1.3.1 -&gt; cudnn[version='6.0.*|&gt;=7.0.0,&lt;=8.0a0|&gt;=7.0.5,&lt;=8.0a0|&gt;=7.1.0,&lt;=8.0a0|&gt;=7.1.3,&lt;8.0a0|&gt;=7.3.0,&lt;=8.0a0|&gt;=7.6,&lt;8.0a0|&gt;=7.6.4,&lt;8.0a0|&gt;=7.3.1,&lt;8.0a0|&gt;=7.6.5,&lt;8.0a0|&gt;=7.1.2,&lt;=8.0a0']
</code></pre>
<p>Best.</p>
<p>K. Frank</p>

username: ptrblck
cooked: <p>A similar issue is tracked <a href="https://github.com/pytorch/pytorch/issues/59222">here</a>.<br>
Would you mind adding your problem there (let me know, if I should cross-post it in case you’re not active on GitHub).</p>
<aside class="quote no-group" data-username="KFrank" data-post="1" data-topic="124964">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/k/ecb155/48.png" class="avatar"> KFrank:</div>
<blockquote>
<p>but numpy was missing.</p>
</blockquote>
</aside>
<p>I came across the same issue, but I’m told it’s a feature, not a bug (and the error message should be better in the nightlies now) <img src="https://discuss.pytorch.org/images/emoji/apple/wink.png?v=12" title=":wink:" class="emoji" alt=":wink:" loading="lazy" width="20" height="20"> so it seems you should install it manually.</p>

username: KFrank
cooked: <p>Hi <a class="mention" href="/u/ptrblck">@ptrblck</a>!</p>
<aside class="quote no-group" data-username="ptrblck" data-post="2" data-topic="124964" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/48/1823_2.png" class="avatar"> ptrblck:</div>
<blockquote>
<p>A similar issue is tracked</p>
</blockquote>
</aside>
<p>Yes, my install issue does look similar (although not line-by-line<br>
identical).</p>
<p>I should also mention that I successfully installed the stable pytorch<br>
(including torchaudio) today without issue.  I used this command:</p>
<pre><code class="lang-plaintext">conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
</code></pre>
<pre><code class="lang-plaintext">&gt;&gt;&gt; torch.__version__
'1.9.0'
</code></pre>
<p>(I didn’t try installing with pip, only conda.)</p>
<aside class="quote no-group">
<blockquote>
<p>let me know, if I should cross-post it in case you’re not active on GitHub</p>
</blockquote>
</aside>
<p>Please cross-post this for me – I lost github login access when google<br>
fizzled on me somehow.</p>
<aside class="quote no-group">
<blockquote>
<p>I came across the same [numpy] issue, but I’m told it’s a feature, not a bug</p>
</blockquote>
</aside>
<p>No worries.  Installing numpy manually does seem to work for me.</p>
<p>Best.</p>
<p>K. Frank</p>