Skip to content

HuggingFaceEmbedding Unable to load local embedding model; Error importing huggingface_hub.hf_api: 'Version' #27758

Answered by tdecosta
tdecosta asked this question in Q&A
Discussion options

You must be logged in to vote

After reviewing the call stack and diving down into the code of importlib, it became apparent there was an issue with obtaining the version installed for PyTorch. Turns out that if you have some lingering dist-info from previous installation of torch the importlib gets "confused" and return None for the version. That along with noticing that I had torch installed for the user and globally that conflicted with each other. After uninstalling torch and then manually doing some clean up on the global site-packages, then re-installing torch seemed to fix the issue.

This was not a compatibility issue between langchain-huggingface and huggingface-hub

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tdecosta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant