Module Not Found Error for Plotly

Summary

Hi all, I’m a novice with Streamlit but really enjoying it so far! When I access my app, I’m receiving the following error for any page that imports Plotly: ModuleNotFoundError: No module named ‘plotly’. I know I need to make a ‘requirements.txt’ file that includes all necessary packages, but I’m still receiving the same error. This all runs fine locally. Does anyone have a suggestion? Thanks!

Traceback (most recent call last):
  File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
    exec(code, module.__dict__)
  File "/mount/src/korbelfantasyapp/Welcome.py", line 10, in <module>
    import plotly.express as px
ModuleNotFoundError: No module named 'plotly'

Links

Hey @hankshackleford thanks for posting,
when I tried to deploy your app, it worked just fine, my-deployment-link
Please make sure you have set your main file path as Welcome.py, selected the main branch. And try to redeploy it. I hope it will work then.

1 Like

Thanks so much for your response! It worked fine as soon as I redeployed it. I really appreciate your help.

1 Like

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