Hello, I’ve been having problems this days while trying to import torch after installling it with the following line:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
When I try to import torch I have the follwing error:
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
Cell In[1], line 2
1 # Importar librerías clásicas
----> 2 import torch
3 import numpy as np
4 import pandas as pd
File c:\Users\2002e\AppData\Local\Programs\Python\Python311\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] No se puede encontrar el módulo especificado. Error loading "c:\Users\2002e\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\lib\fbgemm.dll" or one of its dependencies.
I have seen that the fbgemm.dll file is on the enviroment and that I have everything good configured. I’ve tryed with several cuda and torch versions but is always giving me the error. If I install torch for cpu and import it it works correctly.
I hope someone can help me.