No module called Pytorch

Yvonne_Wong: <p>No module called Pytorch though I install pytorch successfully. However.when I activate it using ‘conda activate pytorch’ it states that ‘Could not find conda environment: pytorch<br>
You can list all discoverable environments with <code>conda info --envs</code>.’<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/d/a/da05f48345346a7019445d558c5c026718f7e0a2.png" data-download-href="https://discuss.pytorch.org/uploads/default/da05f48345346a7019445d558c5c026718f7e0a2" title="image"><img src="https://discuss.pytorch.org/uploads/default/original/3X/d/a/da05f48345346a7019445d558c5c026718f7e0a2.png" alt="image" data-base62-sha1="v6IQxfOAnLnQTfGe3DTgeXaeqJ4" width="690" height="289" data-dominant-color="2A2A29"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">745×313 10.3 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

vaisakh_m: <p>Please share info on how PyTorch was installed.</p>

Shashikant_Prasad: <p>I guess when you install conda it creates a seprate space(Another python directory). {C:\Users\MyPC…}.<br>
If you can… use another IDE preferably PyChram to Jupyter.<br>
OR you have to install Pytorch for that separate py as well.</p>

Yvonne_Wong: <p>I’m using VS Code. I install anaconda then install Pycharm through ‘‘conda install -c pytorch pytorch’’, it showed installed successfully ,then I activate it through “conda activate pytorch”, then it shows 'Could not find conda environment: pytorch<br>
You can list all discoverable environments with conda info --envs.’</p>

Yvonne_Wong: <p>hmm,not really understand it</p>

vaisakh_m: <p><a class="mention" href="/u/yvonne_wong">@Yvonne_Wong</a><br>
See if <a href="https://stackoverflow.com/questions/49951846/installing-pytorch-via-conda" rel="noopener nofollow ugc">this</a> helps.<br>
<img src="https://discuss.pytorch.org/images/emoji/apple/point_up.png?v=9" title=":point_up:" class="emoji" alt=":point_up:"> This is what I think could’ve gone wrong in your case.</p>

Yvonne_Wong: <p>I did try the solution suggested but it is successful in anaconda prompt but fail in VS Code ,not sure what’s wrong<br>
</p><aside class="onebox stackexchange">
  <header class="source">
      <a href="https://stackoverflow.com/questions/65076892/why-successful-install-pytorch-in-anaconda-prompt-but-cant-activate-it-directly" target="_blank" rel="noopener nofollow ugc">stackoverflow.com</a>
  </header>
  <article class="onebox-body">
      <a href="https://stackoverflow.com/users/14656179/yvonne-wong" target="_blank" rel="noopener nofollow ugc">
    <img alt="Yvonne Wong" src="https://lh3.googleusercontent.com/a-/AOh14GjDPdmcImujGzAV50VJM3gLj1CM1Lmngt8ZEcOQXQ=s96-c=k-s128" class="thumbnail onebox-avatar" width="60" height="60">
  </a>
<h4>
  <a href="https://stackoverflow.com/questions/65076892/why-successful-install-pytorch-in-anaconda-prompt-but-cant-activate-it-directly" target="_blank" rel="noopener nofollow ugc">Why successful install pytorch in anaconda prompt but can't activate it directly in VS Code?</a>
</h4>

<div class="tags">
  <strong>python, numpy, visual-studio-code, pytorch</strong>
</div>

<div class="date">
  asked by
  
  <a href="https://stackoverflow.com/users/14656179/yvonne-wong" target="_blank" rel="noopener nofollow ugc">
    Yvonne Wong
  </a>
  on <a href="https://stackoverflow.com/questions/65076892/why-successful-install-pytorch-in-anaconda-prompt-but-cant-activate-it-directly" target="_blank" rel="noopener nofollow ugc">03:57PM - 30 Nov 20 UTC</a>
</div>

  </article>
  <div class="onebox-metadata">
    
    
  </div>
  <div style="clear: both"></div>
</aside>


Archelvan: <p>I have also same problem… Can you help me to solve…<br>
<img src="https://discuss.pytorch.org/uploads/default/original/3X/0/0/0021116a8b1691c01faf3e8e3c2d54a487ba675c.png" alt="Screenshot 2024-03-07 131816" data-base62-sha1="18QzrStYam3f25BP2CpqjYkFsM" width="684" height="170"></p>

ptrblck: <p>Your issue is unrelated to PyTorch since <code>Rhino</code> is failing. Ask in their discussion board how to properly install it in case you get stuck.</p>