在jupyter notebook運行dask distribute client,打開dashboard時,無法顯示監控內容:
from dask.distributed import Client
client = Client(n_workers=4)
client
打開Dashboard: http://127.0.0.1:8787/status
只顯示
後臺報錯:
File ****\Anaconda3\lib\site-packages\bokeh\server\views\ws.py", line 121, in open
if self.selected_subprotocol != ‘bokeh’:
AttributeError: ‘WSHandler’ object has no attribute ‘selected_subprotocol’
問題分析:可能是bokeh的版本與tornado不兼容
解決步驟:
- 查看當前bokeh版本
import bokeh
bokeh.__version__
‘2.0.0’
- 查看dask對bokeh的版本要求
只給出了最低版本。看來是bokeh版本過高。
- 卸載當前bokeh並安裝較低版本
pip uninstall bokeh
pip install bokeh==1.4.0
- 重啓
只重啓dask client不起作用。
重啓jupyter notebook。
重啓dask client ,成功