Reputation: 101
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.
Upvotes: 10
Views: 42440
Reputation: 21
use this
import plotly.offline as pyoff
import plotly.graph_objs as go
fig=dict(data=go.Scatter(x=[1,2,3,4],y=[1,4,9,16],mode = "lines+markers"))
pyoff.iplot(fig)
Upvotes: 1
Reputation: 11
First, install the chart-studio conda package.
conda install -c plotly chart-studio
Then use the following to import pyplot instead of "import plotly.plotly as ply"
from chart-studio import pyplot as ply
Upvotes: 1
Reputation: 41
Downgrading the version helps. Try this:
!pip install plotly==3.10.0
from chart_studio import plotly
This solved my error in google colab
Upvotes: 4
Reputation: 1179
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
Upvotes: 5
Reputation: 1545
Install chart-studio
with pip install chart-studio
at the command line/terminal.
Upvotes: 1
Reputation: 1469
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.
Upvotes: 17