Hello, I had the fbgemm.dll or one of its dependencies is missing error, and I just fixed it. I tried the vc_redist reinstallation, downloading vscommunity, and nothing worked.
What worked for me is this:
- Install miniconda
- Add the folder miniconda and miniconda/Scripts to the user PATH
- Check your python version // In my case 3.12.2
- conda create -n my_environment python=3.12.2
- conda activate my_environment
- conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia //Because previusly I had installed CUDA Toolkit 11.8 Downloads | NVIDIA Developer
- conda install -c conda-forge librosa pandas numpy
And then I tried the following code:
// testTorch.py
import torch
def verificar_torch():
try:
print(“Torch importado exitosamente”)
# Crear un tensor simple para verificar funcionalidad básica
tensor = torch.tensor([1.0, 2.0, 3.0])
print(f"Tensor creado: {tensor}“)
return True
except Exception as e:
print(f"Error al importar torch o al crear un tensor: {e}”)
return False
if name == “main”:
verificar_torch()
And it worked. I hope this helps you.