lxml and bs4 are installed, bs4 works for html, but not lxml. I can import&use lxml as a standalone library nevertheless. Installed from pip, tried force reinstalling. Could anybody help pls?
Here's the ipython session outputs:
Python 3.10.9 | packaged by conda-forge | (main, Feb 2 2023, 20:26:08) [Clang 14.0.6 ]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.12.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import lxml
In [2]: from bs4 import BeautifulSoup
In [3]: BeautifulSoup("", features="xml")
---------------------------------------------------------------------------
FeatureNotFound Traceback (most recent call last)
Cell In[3], line 1
----> 1 BeautifulSoup("", features="xml")
File /opt/homebrew/Caskroom/miniforge/base/envs/pyds310/lib/python3.10/site-packages/bs4/__init__.py:250, in BeautifulSoup.__init__(self, markup, features, builder, parse_only, from_encoding, exclude_encodings, element_classes, **kwargs)
248 builder_class = builder_registry.lookup(*features)
249 if builder_class is None:
--> 250 raise FeatureNotFound(
251 "Couldn't find a tree builder with the features you "
252 "requested: %s. Do you need to install a parser library?"
253 % ",".join(features))
255 # At this point either we have a TreeBuilder instance in
256 # builder, or we have a builder_class that we can instantiate
257 # with the remaining **kwargs.
258 if builder is None:
FeatureNotFound: Couldn't find a tree builder with the features you requested: xml. Do you need to install a parser library?
In [4]: lxml.__version__
Out[4]: '4.9.2'
In [5]: import bs4
In [6]: bs4.__version__
Out[6]: '4.12.2'