Problem description :
Use pycharm perhaps spyder Of plotly Statement can not open the web page
Even with
# Spyder The editor adds the following two lines of code
import plotly.io as pio
pio.renderers.default = 'browser'
Not good either. , It is estimated that it has something to do with the local firewall settings
therefore , We are thinking about using jupyternotebook Carry out non browser visualization
jupyternotebook
Use another mode Code can solve :
# Import package
import plotly
# Use init_notebook_mode() to view the plots in jupyter notebook
plotly.offline.init_notebook_mode()