Deploy Error, Module Plotly not found

ModuleNotFoundError: No module named ‘plotly’

Traceback:

File "/usr/local/lib/python3.7/site-packages/streamlit/script_runner.py", line 332, in _run_script
    exec(code, module.__dict__)File "/app/streamlit/cricsheet.py", line 4, in <module>
    import plotly.express as px

Although, I have installed the plotly modules otherwise it wouldn’t have run in the first place in my local host machine.

Hi @Fatima_Majid, welcome to the Streamlit community!

Where are you trying to deploy your app, Streamlit sharing?

Yes

It’s important to remember that Streamlit sharing is a separate computer than your local development machine, so you need to install your dependencies on Streamlit sharing as well. This is done using a requirements.txt file:

If you have this file created already, please link to your GitHub repo and I can take a look at what else might be causing an issue.

Yes I have had the requirements.txt, I realized it was the one which was causing the bug, I recreated with all the dependencies, still its showing error.
Sure, thanks in advance.
git hub repo link:https://github.com/Fatimamajid95/streamlit/tree/master

Streamlit sharing are linux servers, so this line will not allow your project to build correctly:

Since it’s unlikely that you need all 90 of the dependencies specified by your requirements.txt file, I’d suggest either using pipreq as we suggest in the Streamlit sharing Deploy docs or hand-write your requirements.txt file with the couple of dependencies you actually need.

Best,
Randy

Okay, I tried using pipreqs as well but it doesn’t seems to work well with windows.
I’ll try adding manually then.
Thankyou so much for helping out.

Regards.
Fatima