解決dask的dashboard無法顯示問題

在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不兼容
解決步驟:

  1. 查看當前bokeh版本
import bokeh
bokeh.__version__

‘2.0.0’

  1. 查看dask對bokeh的版本要求

dask對bokeh的版本需求
只給出了最低版本。看來是bokeh版本過高。

  1. 卸載當前bokeh並安裝較低版本

pip uninstall bokeh
pip install bokeh==1.4.0

  1. 重啓
    只重啓dask client不起作用。
    重啓jupyter notebook。
    重啓dask client ,成功
    在這裏插入圖片描述
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章