Torch package not foud

username: Bstrum36
cooked: <p>I am using conda with Pycharm on windows 10 with a gpu</p>
<p>I run the conda command below to install the package and it indicates that it has worked.<br>
PS C:\Users\Conda\HelloWorld&gt; conda install pytorch torchvision torchaudio<br>
(Installation code shown at the end)</p>
<p>I run the code below and get</p>
<p>import numpy as np<br>
import flask as fl<br>
import time<br>
import os<br>
import imutils<br>
import cv2<br>
import torch</p>
<p>“C:\Users\PC User\AppData\Local\Programs\Python\Python39\python.exe” C:/Users/Conda/HelloWorld/main.py<br>
Traceback (most recent call last):<br>
File “C:\Users\Conda\HelloWorld\main.py”, line 11, in <br>
import pytorch<br>
ModuleNotFoundError: No module named ‘pytorch’</p>
<p>Process finished with exit code 1</p>
<hr>
<p>Pack install terminal output<br>
_________________________________________________________________A<br>
PS C:\Users\Conda\HelloWorld&gt; conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch<br>
Collecting package metadata (current_repodata.json): done<br>
Solving environment: done</p>
<h2>
<a name="package-plan-1" class="anchor" href="#package-plan-1"></a>Package Plan</h2>
<p>environment location: C:\Users\Conda</p>
<p>added / updated specs:<br>
- cudatoolkit=11.3<br>
- pytorch<br>
- torchaudio<br>
- torchvision</p>
<p>“C:\Users\PC User\AppData\Local\Programs\Python\Python39\python.exe” C:/Users/Conda/HelloWorld/main.py<br>
Traceback (most recent call last):<br>
File “C:\Users\Conda\HelloWorld\main.py”, line 11, in <br>
import pytorch<br>
ModuleNotFoundError: No module named ‘pytorch’</p>
<p>The following packages will be downloaded:</p>
<pre><code>package                    |            build
---------------------------|-----------------
cudatoolkit-11.3.1         |       h59b6b97_2       545.3 MB
libuv-1.40.0               |       he774522_0         255 KB
pytorch-1.11.0             |py3.9_cuda11.3_cudnn8_0        1.23 GB  pytorch
pytorch-mutex-1.0          |             cuda           3 KB  pytorch
torchaudio-0.11.0          |       py39_cu113         3.1 MB  pytorch
torchvision-0.12.0         |       py39_cu113         9.1 MB  pytorch
------------------------------------------------------------
                                       Total:        1.77 GB
</code></pre>
<p>The following NEW packages will be INSTALLED:</p>
<p>cudatoolkit        pkgs/main/win-64::cudatoolkit-11.3.1-h59b6b97_2<br>
libuv              pkgs/main/win-64::libuv-1.40.0-he774522_0<br>
pytorch            pytorch/win-64::pytorch-1.11.0-py3.9_cuda11.3_cudnn8_0<br>
pytorch-mutex      pytorch/noarch::pytorch-mutex-1.0-cuda<br>
torchaudio         pytorch/win-64::torchaudio-0.11.0-py39_cu113<br>
torchvision        pytorch/win-64::torchvision-0.12.0-py39_cu113</p>
<p>Proceed ([y]/n)? y</p>
<p>Downloading and Extracting Packages<br>
torchvision-0.12.0   | 9.1 MB    | ###################################################################################### | 100%<br>
cudatoolkit-11.3.1   | 545.3 MB  | ###################################################################################### | 100%<br>
pytorch-mutex-1.0    | 3 KB      | ###################################################################################### | 100%<br>
torchaudio-0.11.0    | 3.1 MB    | ###################################################################################### | 100%<br>
pytorch-1.11.0       | 1.23 GB   | ###################################################################################### | 100%<br>
libuv-1.40.0         | 255 KB    | ###################################################################################### | 100%<br>
Preparing transaction: done<br>
Verifying transaction: done<br>
Executing transaction: done<br>
PS C:\Users\Conda\HelloWorld&gt;</p>
<p>Please advise, Thanks</p>

username: ptrblck
cooked: <p>This seems to be wrong:</p>
<pre><code class="lang-python">import pytorch
ModuleNotFoundError: No module named ‘pytorch’
</code></pre>
<p>as the module is called <code>torch</code>.</p>
<pre><code class="lang-python">import numpy as np
import flask as fl
import time
import os
import imutils
import cv2
import torch
</code></pre>
<p>should work.</p>