导入错误:无法从 'bokeh.core.properties' (C:\ProgramData\Anaconda3\lib\site-packages\bokeh\core\properties.py) 导入名称 'Nullable'

问题描述

导入holoviews时弹出上面的错误。我尝试了不同的方法,但没有奏效。下面导入

        import plotly.express as px
        from wordcloud import WordCloud,STOPWORDS
        import holoviews as hv
        from holoviews import opts
        hv.extension('bokeh')
        
        And installed the bokeh using pip install bokeh
produces an error:
        ImportError: cannot import name 'Nullable' from 'bokeh.core.properties' (C:\ProgramData\Anaconda3\lib\site-packages\bokeh\core\properti`enter code here`es.py)

        how can I fix this error?

解决方法

Nullable 是最近添加的。您需要安装较新版本的 Bokeh。

,

我更新了holoviews和bokeh版本,bokeh=2.3.2 holoviews=1.14 nullable 最近添加了-v 2.3.2。现在一切正常。