Unable to import soundfile from torchaudio

username: eatcah
cooked: <p>Hi there,<br>
I am having issue when importing torchaudio.backend.soundfile_backend.load<br>
Here is the full explanations:</p>
<ol>
<li>
<p>I clone my current working env to a new env in anaconda. I though everything should be working as usual as in my existing env. However, it is not.</p>
</li>
<li>
<p>I run two of these:<br>
a) pip install soundfile<br>
b) conda install -c conda-forge pysoundfile</p>
</li>
</ol>
<p>It returns:<br>
a) Requirement already satisfied: soundfile in c:\users\user\anaconda3\envs\pytorch-gpu-teobased\lib\site-packages (0.11.0)<br>
Requirement already satisfied: cffi&gt;=1.0 in c:\users\user\anaconda3\envs\pytorch-gpu-teobased\lib\site-packages (from soundfile) (1.15.1)<br>
Requirement already satisfied: pycparser in c:\users\user\anaconda3\envs\pytorch-gpu-teobased\lib\site-packages (from cffi&gt;=1.0-&gt;soundfile) (2.21)</p>
<p>b) Collecting package metadata (current_repodata.json): done<br>
Solving environment: done</p>
<p>==&gt; WARNING: A newer version of conda exists. &lt;==<br>
current version: 22.9.0<br>
latest version: 23.1.0</p>
<p>Please update conda by running</p>
<pre><code>$ conda update -n base -c defaults conda
</code></pre>
<h1>
<a name="all-requested-packages-already-installed-1" class="anchor" href="#all-requested-packages-already-installed-1"></a>All requested packages already installed.</h1>
<p>Retrieving notices: …working… done</p>
<ol start="3">
<li>However, the error on jupyter notebook is still showing:<br>
RuntimeError: torchaudio.backend.soundfile_backend.load requires soundfile, but we failed to import it. Please check the installation of soundfile.</li>
</ol>
<p>What should I do now? I also have rerun torchaudio conda reinstallation. But no luck.<br>
Hope anyone can help me on this.<br>
For cloning, do I actually need to reinstall pytorch, and others?</p>
<p>Thanks!</p>

username: eatcah
cooked: <p>This SO thread does solve my issue:</p><aside class="onebox stackexchange" data-onebox-src="https://stackoverflow.com/questions/52916266/cant-import-soundfile">
  <header class="source">

      <a href="https://stackoverflow.com/questions/52916266/cant-import-soundfile" target="_blank" rel="noopener nofollow ugc">stackoverflow.com</a>
  </header>

  <article class="onebox-body">
      <a href="https://stackoverflow.com/users/6932073/j-d" target="_blank" rel="noopener nofollow ugc">
    <img alt="J.D" src="https://i.stack.imgur.com/89TUi.png?s=256&amp;g=1" class="thumbnail onebox-avatar" width="256" height="256">
  </a>

<h4>
  <a href="https://stackoverflow.com/questions/52916266/cant-import-soundfile" target="_blank" rel="noopener nofollow ugc">Can't import soundfile</a>
</h4>

<div class="tags">
  <strong>python, conda, librosa</strong>
</div>

<div class="date">
  asked by
  
  <a href="https://stackoverflow.com/users/6932073/j-d" target="_blank" rel="noopener nofollow ugc">
    J.D
  </a>
  on <a href="https://stackoverflow.com/questions/52916266/cant-import-soundfile" target="_blank" rel="noopener nofollow ugc">02:21PM - 21 Oct 18 UTC</a>
</div>

  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>
<p>
Thanks.</p>