I am just beginning my Python journey and trying to replicate code from: Using Python and Auto ARIMA to Forecast Seasonal Time Series
When I attempt to run the following:
import plotly.plotly as ply
I receive the following import error:
The plotly.plotly module is deprecated, please install the chart-studio package and use the chart_studio.plotly module instead.
I have tried uninstalling and then reinstalling plotly into my Anaconda instance, but to no avail.
I think should provide a little more context and say something like: The plotly.plotly module is deprecated. To create figures using the Chart Studio service, please install the chart-studio package and use the chart_studio.plotly module instead.
This is an example of a plotly graph correctly rendering inside dash: In order to use plotly in JupyterLab, you must have the jupyterlab-plotly extension installed as detailed in the Getting Started guide. When you install plotly, this extension is automatically made available to any JupyterLab 3.x installation in the same Python environment.
This error occurs when Python does not detect the Plotly library in your current environment. This tutorial shares the exact steps you can use to troubleshoot this error. Since Plotly doesn’t come installed automatically with Python, you’ll need to install it yourself.
The easiest way to do so is by using pip, which is a package manager for Python. You can then run the following code to see if Plotly was successfully installed:
The following steps serve the purpose:
chart-studio
by running the following in Anaconda Prompt:pip install chart-studio
chart-studio
package by running:from chart_studio import plotly
in place of from plotly import plotly
.
One can learn more about chart-studio
here.
As mentioned above, you can use plotly
as follows:
from chart_studio import plotly
After that, you can use other associated libraries as usual:
import plotly.offline as pyoff
import plotly.graph_objs as go
I hope this was useful
Downgrading the version helps. Try this:
!pip install plotly==3.10.0
from chart_studio import plotly
This solved my error in google colab
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