9

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

2
  • 1
    stackoverflow.com/questions/34072117/install-plotly-in-anaconda This might be helpful. Commented Jan 22, 2019 at 21:46
  • Thanks a lot for your answer @Freedom Frog. I have seen this question but none of these answers could help me. I have tried to run all the commands in my terminal but none of them worked. Could there maybe be a more basic problem? Commented Jan 23, 2019 at 5:46

3 Answers 3

5

I have now solved the problem. I just opened a new Terminal and made sure that I wrote the command

pip install cufflinks

directly after the second line.

The same worked for

pip install plotly

enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

That's great, I downloaded the file to local drive, and pip installed from there
2

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

Comments

0

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()

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.