Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyTorch Error loading "\lib\site-packages\torch\lib\shm.dll" or one of its dependencies

I cannot use PyTorch and Shap getting this error

PyTorch Error loading  "\lib\site-packages\torch\lib\shm.dll" or one of its dependencies.

I have tried

  • to uninstall and re-install PyTorch, failed
  • create a new conda environment and reinstalled everything including PyTorch, failed
  • to install .NET C++ as suggested in other posts, but it was already installed

I am not an expert on SO and dependencies, but i find it strange that there is not an easy way to fix it. Any idea?

like image 410
fede72bari Avatar asked Sep 12 '25 02:09

fede72bari


1 Answers

pip install torch==2.2.1 solved my problem, but additionally i tried to run this code but it didn't solve conda install cudatoolkit

like image 189
Narmin Jabbarli Avatar answered Sep 13 '25 14:09

Narmin Jabbarli