An error occurs when using “langchain_community.embeddings HuggingFaceEmbeddings” #25538
Replies: 1 comment 2 replies
-
Hello @yingxin-chen! I'm here to assist you with your issue. I can help you solve bugs, answer questions, and become a contributor. To resolve the You can update pip install --upgrade urllib3 If the issue persists, you may need to ensure that all related packages are updated to compatible versions. You can do this by updating all packages: pip install --upgrade requests urllib3 This should resolve the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
I use HuggingFaceEmbeddings to build the local embedding model, but the following error occurs:
ImportError Traceback (most recent call last)
E:\Anaconda3\Lib\site-packages\transformers\utils\import_utils.py in _get_module(self, module_name)
1183 # docstyle-ignore
-> 1184 ESSENTIA_IMPORT_ERROR = """
1185 {0} requires essentia library. But that was not found in your environment. You can install them with pip:
e:\Anaconda3\lib\importlib_init_.py in import_module(name, package)
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
128
e:\Anaconda3\lib\importlib_bootstrap.py in _gcd_import(name, package, level)
e:\Anaconda3\lib\importlib_bootstrap.py in find_and_load(name, import)
e:\Anaconda3\lib\importlib_bootstrap.py in find_and_load_unlocked(name, import)
e:\Anaconda3\lib\importlib_bootstrap.py in _load_unlocked(spec)
e:\Anaconda3\lib\importlib_bootstrap_external.py in exec_module(self, module)
e:\Anaconda3\lib\importlib_bootstrap.py in _call_with_frames_removed(f, *args, **kwds)
E:\Anaconda3\Lib\site-packages\transformers\integrations\peft.py in
...
1188 """
RuntimeError: Failed to import transformers.models.bert.modeling_bert because of the following error (look up to see its traceback):
Failed to import transformers.integrations.peft because of the following error (look up to see its traceback):
cannot import name 'DEFAULT_CIPHERS' from 'urllib3.util.ssl_' (E:\Anaconda3\Lib\site-packages\urllib3\util\ssl_.py)
System Info
python==3.9.13
langchain==0.1.17
transformers==4.37.2
urllib3==2.2.2
Beta Was this translation helpful? Give feedback.
All reactions