I am using Python 3.11.7 on Jupyter Notebook. I am trying to install the library transformers in Jupyter with pip install transformers It has a dependency on package torch and I have torch version 2.11.0 preinstalled. Installation goes fine, but when I try to import following library
from transformers import pipeline
I get error:
File ~\AppData\Local\anaconda3\Lib\site-packages\torch\__init__.py:268, in _load_dll_libraries()
264 err = ctypes.WinError(last_error)
265 err.strerror += (
266 f' Error loading "{dll}" or one of its dependencies.'
267 )
--> 268 raise err
269 elif res is not None:
270 is_loaded = True
OSError: [WinError 1114] A dynamic link library (DLL) initialization routine failed.
Error loading "C:\Users\abcd\AppData\Local\anaconda3\Lib\site-packages\torch\lib\c10.dll" or one of its dependencies.
I looked on the internet and tried these solution 1 and solution 2 here, but it doesn't help. Many people have experienced this error, and have used similar solutions as suggested in the aforementioned link, but that doesn't work for me.
c10.dll. It may need to install some other.dllwhich is not part on Python or any Python's module and it may need to install it manually.