Plotly in Jupyter issue

psaltistha picture psaltistha · Apr 30, 2016 · Viewed 21k times · Source

I installed plotly.py to work some plots using Jupyter but I cannot import it.

! pip install plotly --upgrade
Requirement already up-to-date: plotly in c:\python34\lib\site-packages
Requirement already up-to-date: requests in c:\python34\lib\site-packages (from plotly)
Requirement already up-to-date: six in c:\python34\lib\site-packages (from plotly)
Requirement already up-to-date: pytz in c:\python34\lib\site-packages (from plotly)
Cleaning up...

and then

  import plotly
  ---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-6-c27a4132ad2e> in <module>()
----> 1 import plotly

  ImportError: No module named 'plotly'

I'm running Python 3.4.1, so as Jupyter, and the thing that I cannot get is that plotly works just fine when I'm running Python from the command line. Any suggestions? (I really don't want to clean install Python)

Answer

Satish picture Satish · Mar 23, 2017

Running following on command prompt solved my issue.

conda install -c https://conda.anaconda.org/plotly plotly

It is likely that the plotly installed via pip install is somehow not detected by Jupter.