'in Jupyter Notebook ModuleNotFoundError: No module named 'plotly'

I installed plotly library using anaconda prompt and it is appearing in my conda list. I can use it in Spyder but when i Import it in my Jupyter Notebook it Shows an Import error.


ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-2-182e2a6c8e92> in <module>
----> 1 import plotly as py

ModuleNotFoundError: No module named 'plotly'

But in my conda list it is seen as this.

plotly                    3.10.0                     py_0    conda-forge


Solution 1:[1]

Your Jupyter Notebook is probably not part of the Anaconda. Hence it is not recognising packages installed through Anaconda.

Solution 1 install Jupyter Notebook in Anaconda and try to run notebooks from there. When you will import plotly there it will be imported.

Solution 2 install pip. Here's how: how to install pip Then use pip install plotly in command prompt. You will be able to import plotly in Jupyter now.

Feel free to comment if you have any questions.

Solution 2:[2]

enter image description here

1-run anaconda navigator 2-go to envirmont 3- select all 4-and search plotly 5- if not their install it

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 TulakHord
Solution 2 mohd Bilal