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/", line 552, in _run_script

    exec(code, module.__dict__)

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

    import as px

ModuleNotFoundError: No module named 'plotly'

* Link to your GitHub repo:

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.