0

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.

10
  • there are tools which can show what dependencies has c10.dll . It may need to install some other .dll which is not part on Python or any Python's module and it may need to install it manually. Commented 2 days ago
  • windows - How to check for DLL dependency? - Stack Overflow Commented 2 days ago
  • did you try solution 4 from your link: "Solution 4: Install latest Microsoft Visual C++"? Commented 2 days ago
  • @furas Hallo! I can't do that as that's restricted as it is at client site :( Commented 2 days ago
  • 1
    @furas I think he wants to distribute the script to customers. Commented yesterday

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.