vectorbt icon indicating copy to clipboard operation
vectorbt copied to clipboard

plotly error - Please install ipywidgets>=7.0.0 to use the FigureWidget class

Open posidonius opened this issue 2 years ago • 3 comments

portfolio.plot().show() produces this error:

python3.10/site-packages/plotly/missing_ipywidgets.py", line 13, in __init__
    raise ImportError(
ImportError: Please install ipywidgets>=7.0.0 to use the FigureWidget class

I have the following versions installed

ipywidgets                    7.6.5
vectorbt                      0.24.2

I did have this plotting working for a long time but suddenly one day it stopped working. I am also seeing the following warnings, not sure if they are related:

python3.10/site-packages/vectorbt/generic/plots_builder.py:339: UserWarning: Subplot 'orders' does not support grouped data

python3.10/site-packages/vectorbt/generic/plots_builder.py:339: UserWarning: Subplot 'trade_pnl' does not support grouped data

posidonius avatar Nov 28 '22 06:11 posidonius

Make sure to upgrade plotly to the latest version.

polakowo avatar Nov 28 '22 11:11 polakowo

Other warnings are not related; they are telling you that some subplots cannot display groups, only columns, so you have to pass group_by=False, column=column to display column of data.

polakowo avatar Nov 28 '22 11:11 polakowo

Thanks for your reply, Oleg! I did already upgrade plotly to the following version:

plotly 5.11.0

This seems to be the latest version. I am getting the above error with the latest version of plotly.

posidonius avatar Nov 28 '22 23:11 posidonius