Deployment ModuleNotFoundError using plotly.express

I have been trying to deploy my app, but I get the error message below. The console log does not show further details and I made sure plotly-express is installed to my environment.

Image:

Full Description:

File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script
    exec(code, module.__dict__)
File "/app/pythonproject/app.py", line 3, in <module>
    import plotly.express as px

Link: GitHub repository

Thank you,
Lucas

Please share a link to your public github repo.

I added it to the original post description.

File is missing:

requirements.txt

pandas
pillow
plotly
streamlit

Hi Franky, I appreciate your help. I added the requirements.txt file but now I get the following error message:

File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script
    exec(code, module.__dict__)
File "/app/pythonproject/app.py", line 12, in <module>
    dataset = pd.read_excel(
File "/home/appuser/venv/lib/python3.9/site-packages/pandas/io/excel/_base.py", line 504, in read_excel
    io = ExcelFile(
File "/home/appuser/venv/lib/python3.9/site-packages/pandas/io/excel/_base.py", line 1580, in __init__
    self._reader = self._engines[engine](
File "/home/appuser/venv/lib/python3.9/site-packages/pandas/io/excel/_openpyxl.py", line 552, in __init__
    import_optional_dependency("openpyxl")
File "/home/appuser/venv/lib/python3.9/site-packages/pandas/compat/_optional.py", line 135, in import_optional_dependency
    raise ImportError(msg)

Any thoughts?

Just add openpyxl to the requirements.txt file.

You are amazing, thank you.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.