I'm a total beginner and I have a problem installing plotly to use it in my Jupyter Notebook. I have installed the Python 3 version. I am also using a Mac if that matters. I tried a variety of commands in the terminal but none of them worked.
This is my command in Jupyter Notebook:
from plotly import __version__
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
print(__version__) # requires version >= 1.9.0
This is the error I get:
ModuleNotFoundError: No module named 'plotly'
I would really appreciate some help! Thanks in advance. Desperate beginner
Download whl file: https://files.pythonhosted.org/packages/3e/77/905effe9361395d3e094ffd2b54b4085d339a7b7de9c2c91fa55ec257422/plotly-3.5.0-py2.py3-none-any.whl
use pip install C:\\Users\\Downloads\\plotly-3.5.0-py2.py3-none-any.whl
Official documentation page says:
For use in the classic Jupyter Notebook, install the notebook
and ipywidgets
packages using pip...
$ pip install "notebook>=5.3" "ipywidgets>=7.2"
or conda.
$ conda install "notebook>=5.3" "ipywidgets>=7.2"
These packages contain everything you need to run a Jupyter notebook...
$ jupyter notebook
Display plotly figures inline using the notebook renderer...
import plotly.graph_objects as go
fig = go.Figure(data=go.Bar(y=[2, 3, 1]))
fig.show()
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.