I'm trying to follow along with the following YouTube tutorial:
https://www.youtube.com/watch?v=D35m2CdMhVs
I set up the environment through Anaconda and am using Jupyter to code. I imported pandas
and plotly
for the code and yet the iplot
function is not recognized.
The import
statements in the code look like this:
import plotly
import plotly.figure_factory as ff
import pandas as pd
This is the specific error message I'm getting:
NameError: name 'iplot' is not defined
The tutorial is from 2018 and the author specifies the versions of some of the dependencies at the beginning of the tutorial. According to this answer, there has been a change in plotly
between v3 and v4. According to the official web site 4.0 came in 2019.
Please check for compatibility between what is in the tutorial and what the version of the API you're using offers. Also quite often people mix Python 2.x with 3.x (especially if they polute the environment set by Anaconda and similar with direct calls to pip
/pip3
).