import plotly.graph_objs as go code example Example: upgrade plotly version pip install plotly --upgrade