Import Plotly error

I am trying to import plotly but it gives an error that the module is not found. I have tried different versions of Python, created environments just for the app but its the same.
Also, I have tried to deploy it in Sharing but it fails to install dependencies.