codebasics / langchain

Tutorial for langchain LLM library
128 stars 223 forks source link

ImportError: dlopen (symbol not found in flat namespace '_exsltDateXpathCtxtRegister') #3

Closed RATHOD-SHUBHAM closed 1 year ago

RATHOD-SHUBHAM commented 1 year ago

from langchain.document_loaders import UnstructuredHTMLLoader is providing me with a weird error of '_exsltDateXpathCtxtRegister' each time.

I tried various methods including uninstalling and installing lxml packages.

still no luck.

This is the exact error:

ImportError: dlopen(/url_parser/venv/lib/python3.10/site-packages/lxml/etree.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '_exsltDateXpathCtxtRegister'

Help will be much appreciated.

RATHOD-SHUBHAM commented 1 year ago

I was able to solve this by

First Installing

brew install libxml2
brew install libxslt

And then doing this pip install lxml==4.9.2