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)
If you are encountering problems using plotly with Dash please first ensure that you have upgraded dash to the latest version, which will automatically upgrade dash-core-components to the latest version, ensuring that Dash is using an up-to-date version of the Plotly. js rendering engine for plotly .
You can publish Jupyter Notebooks on Plotly. Simply visit plot.ly and select the + Create button in the upper right hand corner. Select Notebook and upload your Jupyter notebook (. ipynb) file!
Solution: ImportError: The plotly. plotly module is deprecated, | Data Science and Machine Learning | Kaggle.
The easiest way to do so is by using pip, which is a package manager for Python. What is this? If plotly is displayed with a version number, this means that it was successfully installed.
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.
In the jupyter notebook, running the correct kernel you want the package to be installed, run
import sys
!conda install --yes --prefix {sys.prefix} plotly
This installs plotly within the correct kernel.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With