没有名为“ bokeh.plotting”的模块;散景不是包

mac*_*ump 3 python bokeh

我想进口curdoc。我已经尝试过from bokeh.io import curdocfrom bokeh.plotting import curdoc但是都没有用。

我已经尝试过了pip install -U bokehpip install bokeh但仍然返回no module named 'bokeh.plotting; 'bokeh' is not a package'。怎么了?

我现在已经恢复到0.12.1。

小智 9

检查您的文件夹中是否有名为bokeh.py的程序,请重命名该文件夹,因为它是从程序bokeh.py中而不是从库中选择bokeh.plotting。

  • 这个答案节省了我很多时间。谢谢。 (2认同)