i have this line of code where im using model(all-MiniLM-L6-v2) from SentenceTransfomerEmbeddings from hugging face. im getting this error”ModuleNotFoundError: No module named ‘torch.utils’. ImportError:Could not import sentence_transformers python package.Please install it with pip install sentence_transformers
” due to this import statement “from langchain_community.embeddings import SentenceTransformerEmbeddings”.
- tried upgrading, downgrading langchain,python.
- tried “pip install sentence-transformers”. got no error. “pip list” showed sentence_transformers .but still showed same error when i ran my code.
- tried upgrading torch
New contributor
Ashritha Medishetty is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.