No module named 'Plotly'

Getting this error when trying to deploy my app. Works fine when running via VS Code locally. I’ve searched for hours and can’t seem to find a fix. This is my first app so I may be missing something super obvious. Thanks in advance for any help.

2023-07-21 15:24:13.483 Uncaught app exception

Traceback (most recent call last):

File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script

    exec(code, module.__dict__)

  File "/app/analytics-project/app.py", line 5, in <module>

    import plotly.express as px

ModuleNotFoundError: No module named 'plotly'

* Link to your GitHub repo: https://github.com/Bpolowniak/Analytics-project/tree/main

I see that you have a requirements-2.txt file in your repository. When deploying on Streamlit Community Cloud, you need to name your requirements file exactly requirements.txt for it to be found and used by the system. Hopefully that will fix it. (You can forcefully reboot your app after pushing an edit if it doesn’t rebuild itself automatically.)

worked! thank you.

1 Like

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