'pandas read_htm parse fails for lxml
I definitely have lxml installed but pandas read_html thinks not. (I am on windows10 python38). my code:
# problem: lxml not found, please install it
import pandas as pd
import lxml # IS installed
url = 'https://harrypotter.fandom.com/wiki/Yvonne'
df = pd.read_html(url) # lxml not found, please install it
print(df.head())
Traceback (most recent call last): File "C:/Python/Python38/OurStuff/AI/NLP/knowledge-scraper.py", line 5, in pd = pd.read_html(url) # lxml not found, please install it File "C:\Python\Python38\lib\site-packages\pandas\util_decorators.py", line 311, in wrapper return func(*args, **kwargs) File "C:\Python\Python38\lib\site-packages\pandas\io\html.py", line 1098, in read_html return _parse( File "C:\Python\Python38\lib\site-packages\pandas\io\html.py", line 902, in _parse parser = _parser_dispatch(flav) File "C:\Python\Python38\lib\site-packages\pandas\io\html.py", line 859, in _parser_dispatch raise ImportError("lxml not found, please install it") ImportError: lxml not found, please install it
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
