# Torch package not foud

**URL:** <https://discuss.pytorch.org/t/torch-package-not-foud/153223>\
**Category:** windows\
**Created:** [June 3, 2022, 1:36am UTC](https://discuss.pytorch.org/t/torch-package-not-foud/153223 "2022-06-03T01:36:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bstrum36](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/bstrum36/32/49549_2.png) [@Bstrum36](https://discuss.pytorch.org/u/Bstrum36)\
**Post date:** [June 3, 2022, 1:36am UTC](https://discuss.pytorch.org/t/torch-package-not-foud/153223/1 "2022-06-03T01:36:10Z")

</div>

I am using conda with Pycharm on windows 10 with a gpu

I run the conda command below to install the package and it indicates that it has worked.  
PS C:\Users\Conda\HelloWorld\> conda install pytorch torchvision torchaudio  
(Installation code shown at the end)

I run the code below and get

import numpy as np  
import flask as fl  
import time  
import os  
import imutils  
import cv2  
import torch

“C:\Users\PC User\AppData\Local\Programs\Python\Python39\python.exe” C:/Users/Conda/HelloWorld/main.py  
Traceback (most recent call last):  
File “C:\Users\Conda\HelloWorld\main.py”, line 11, in   
import pytorch  
ModuleNotFoundError: No module named ‘pytorch’

Process finished with exit code 1

* * *

Pack install terminal output  
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_A  
PS C:\Users\Conda\HelloWorld\> conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch  
Collecting package metadata (current\_repodata.json): done  
Solving environment: done

## Package Plan

environment location: C:\Users\Conda

added / updated specs:  
- cudatoolkit=11.3  
- pytorch  
- torchaudio  
- torchvision

“C:\Users\PC User\AppData\Local\Programs\Python\Python39\python.exe” C:/Users/Conda/HelloWorld/main.py  
Traceback (most recent call last):  
File “C:\Users\Conda\HelloWorld\main.py”, line 11, in   
import pytorch  
ModuleNotFoundError: No module named ‘pytorch’

The following packages will be downloaded:

```
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

```

The following NEW packages will be INSTALLED:

cudatoolkit pkgs/main/win-64::cudatoolkit-11.3.1-h59b6b97\_2  
libuv pkgs/main/win-64::libuv-1.40.0-he774522\_0  
pytorch pytorch/win-64::pytorch-1.11.0-py3.9\_cuda11.3\_cudnn8\_0  
pytorch-mutex pytorch/noarch::pytorch-mutex-1.0-cuda  
torchaudio pytorch/win-64::torchaudio-0.11.0-py39\_cu113  
torchvision pytorch/win-64::torchvision-0.12.0-py39\_cu113

Proceed ([y]/n)? y

Downloading and Extracting Packages  
torchvision-0.12.0 | 9.1 MB | ###################################################################################### | 100%  
cudatoolkit-11.3.1 | 545.3 MB | ###################################################################################### | 100%  
pytorch-mutex-1.0 | 3 KB | ###################################################################################### | 100%  
torchaudio-0.11.0 | 3.1 MB | ###################################################################################### | 100%  
pytorch-1.11.0 | 1.23 GB | ###################################################################################### | 100%  
libuv-1.40.0 | 255 KB | ###################################################################################### | 100%  
Preparing transaction: done  
Verifying transaction: done  
Executing transaction: done  
PS C:\Users\Conda\HelloWorld\>

Please advise, Thanks

---

<div class="post-metadata">

**Author:** ![ptrblck](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/32/1823_2.png) [@ptrblck](https://discuss.pytorch.org/u/ptrblck)\
**Post date:** [June 3, 2022, 3:55am UTC](https://discuss.pytorch.org/t/torch-package-not-foud/153223/2 "2022-06-03T03:55:12Z")

</div>

This seems to be wrong:

```python
import pytorch
ModuleNotFoundError: No module named ‘pytorch’

```

as the module is called `torch`.

```python
import numpy as np
import flask as fl
import time
import os
import imutils
import cv2
import torch

```

should work.
