Repository: pytorch
Issue: Torch not found
Labels: module: dependency bug,module: windows,triaged,dependency issue

### 🐛 Describe the bug

---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
Cell In[2], line 2
      1 import numpy as np
----> 2 import torch
      3 import torch.nn as nn
      4 import torch.optim as optim

File ~\Downloads\SPORTS\anaconda\Lib\site-packages\torch\__init__.py:148
    146                 err = ctypes.WinError(ctypes.get_last_error())
    147                 err.strerror += f' Error loading "{dll}" or one of its dependencies.'
--> 148                 raise err
    150     kernel32.SetErrorMode(prev_error_mode)
    153 def _preload_cuda_deps(lib_folder, lib_name):

OSError: [WinError 126] The specified module could not be found. Error loading "C:\Users\DELL\Downloads\SPORTS\anaconda\Lib\site-packages\torch\lib\fbgemm.dll" or one of its dependencies. even though i installed and import torch its showing like this only. So,i reinstalled it after that also it shows error like this.. and i run the command  !pip install torch torchvision torchaudio it shows like this again...
![Screenshot 2024-08-09 122231](https://github.com/user-attachments/assets/7b2da332-9075-4fa7-82c9-8a2cbad967c1)



### Versions

Collecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A

OS: Microsoft Windows 11 Home Single Language
GCC version: Could not collect
Clang version: Could not collect
CMake version: Could not collect
Libc version: N/A

Python version: 3.12.4 | packaged by Anaconda, Inc. | (main, Jun 18 2024, 15:03:56) [MSC v.1929 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-11-10.0.22631-SP0
Is CUDA available: N/A
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A

CPU:
Architecture=9


CurrentClockSpeed=2300


DeviceID=CPU0


Family=107


L2CacheSize=1024


L2CacheSpeed=


Manufacturer=AuthenticAMD


MaxClockSpeed=2300


Name=AMD Athlon Silver 3050U with Radeon Graphics   


ProcessorType=3


Revision=6145

Versions of relevant libraries:
[pip3] flake8==7.0.0
[pip3] mypy==1.10.0
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.26.4
[pip3] numpydoc==1.7.0
[pip3] torch==2.4.0+cu118
[pip3] torchaudio==2.4.0+cu118
[pip3] torchvision==0.19.0
[conda] _anaconda_depends         2024.06             py312_mkl_2  
[conda] blas                      1.0                         mkl  
[conda] mkl                       2023.1.0         h6b88ed4_46358  
[conda] mkl-service               2.4.0           py312h2bbff1b_1  
[conda] mkl_fft                   1.3.8           py312h2bbff1b_0  
[conda] mkl_random                1.2.4           py312h59b6b97_0  
[conda] numpy                     1.26.4          py312hfd52020_0  
[conda] numpy-base                1.26.4          py312h4dde369_0  
[conda] numpydoc                  1.7.0           py312haa95532_0  
[conda] torch                     2.4.0+cu118              pypi_0    pypi
[conda] torchaudio                2.4.0+cu118              pypi_0    pypi
[conda] torchvision               0.19.0                   pypi_0    pypi

cc @peterjc123 @mszhanyi @skyline75489 @nbcsm @iremyux @Blackhex