Importing plotly in jupyther says module not defined

challenges in importing plotly

This sounds like plotly isn’t installed in the Python environment Jupyter is using

See this link for how to install plotly: Getting started with plotly in Python

It’s also possible you have installed plotly in one Python environment but the Jupyter kernel is wrongly set up and is using the wrong environment. See, e.g. this link for setting up Jupyter kernels: Managing Jupyter Kernels: A Comprehensive Guide - GeeksforGeeks