ERROR: Could not find a version that satisfies the requirement lmxl==4.6.2 (from versions: none) & ImportError: lxml not found, please install it

ERROR: Could not find a version that satisfies the requirement lmxl==4.6.2 (from versions: none)

ERROR: No matching distribution found for lmxl==4.6.2

Traceback:

File "/home/appuser/venv/lib/python3.7/site-packages/streamlit/ScriptRunner.py", line 322, in _run_script
    exec(code, module.__dict__)File "/app/basketballstats_app/basketball_app.py", line 29, in <module>
    playerstats = load_data(selected_year)File "/home/appuser/venv/lib/python3.7/site-packages/streamlit/caching.py", line 591, in wrapped_func
    return get_or_create_cached_value()File "/home/appuser/venv/lib/python3.7/site-packages/streamlit/caching.py", line 575, in get_or_create_cached_value
    return_value = func(*args, **kwargs)File "/app/basketballstats_app/basketball_app.py", line 23, in load_data
    html = pd.read_html(url, header = 0)File "/home/appuser/venv/lib/python3.7/site-packages/pandas/io/html.py", line 1100, in read_html
    displayed_only=displayed_only,File "/home/appuser/venv/lib/python3.7/site-packages/pandas/io/html.py", line 891, in _parse
    parser = _parser_dispatch(flav)File "/home/appuser/venv/lib/python3.7/site-packages/pandas/io/html.py", line 848, in _parser_dispatch
    raise ImportError("lxml not found, please install it")

My requirements.txt has these installed when I get the traceback above:

matplotlib==3.3.4
numpy==1.18.2
pandas==1.0.3
pybase64==1.1.3
streamlit==0.62.0
seaborn==0.11.1

and when I include lmxl==4.6.2 to the requirements.txt I get this error when deploying to Streamlit:

ERROR: Could not find a version that satisfies the requirement lmxl==4.6.2 (from versions: none)
ERROR: No matching distribution found for lmxl==4.6.2

anyone know what the issue is?

Hi @FilipinoBroskie, welcome to the Streamlit community!! :wave: :partying_face:

It took me a while to figure it out, but it looks like it’s an easy to miss typo in the package name. The package should be lxml, not lmxl. Switch the x and m characters, and you should be good to go!

lxml is required by Pandas when calling the pd.read_html() method.

Happy Streamlit’ing! :balloon:
Snehan

Oh Wow! a typo haha

Thanks a lot!

1 Like