ChemPlot icon indicating copy to clipboard operation
ChemPlot copied to clipboard

ImportError: cannot import name 'Panel' from 'bokeh.models'

Open GattiMh opened this issue 2 years ago • 3 comments

Hello!

Thanks for uploading the packaged. I'm currently running on an M1 Mac with python 3.10 and I get this error when loading the tutorial dataset file. Any idea why that might be? Thanks

>> bokeh info
Python version      :  3.10.9 (main, Jan 11 2023, 09:18:20) [Clang 14.0.6 ]
IPython version     :  8.12.0
Tornado version     :  6.2
Bokeh version       :  3.1.0

GattiMh avatar Apr 04 '23 11:04 GattiMh

The current version of ChemPlot seems to be incompatible with Bokeh >= 3.0. Installing Bokeh 2.4.3 solved the problem for me.

mrcblt avatar Apr 06 '23 12:04 mrcblt

I changed the conda requirements to use Bokeh 2.4.3 but it still is throwing an error trying to load: /opt/homebrew/lib/python3.11/site-packages/umap/distances.py:1063: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details. @numba.jit() /opt/homebrew/lib/python3.11/site-packages/umap/distances.py:1071: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details. @numba.jit() /opt/homebrew/lib/python3.11/site-packages/umap/distances.py:1086: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details. @numba.jit() /opt/homebrew/lib/python3.11/site-packages/umap/umap_.py:660: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details. @numba.jit() Traceback (most recent call last): File "/Users/kelsorj/Projects/ChemPlot/chemplot/tests/githubTutorial.py", line 1, in import chemplot as cp File "/opt/homebrew/lib/python3.11/site-packages/chemplot/init.py", line 1, in from .chemplot import Plotter File "/opt/homebrew/lib/python3.11/site-packages/chemplot/chemplot.py", line 26, in from bokeh.models import ColorBar, HoverTool, Panel, Tabs ImportError: cannot import name 'Panel' from 'bokeh.models' (/opt/homebrew/lib/python3.11/site-packages/bokeh/models/init.py)

kelsorj avatar May 07 '23 21:05 kelsorj

Hello, I met same problem with you, and I also tried to install Bokeh = 2.4.3 version, but still cannot work. So I checked the version of matplotlib, and tried to install matplotlib=3.3.2, and conda informed me that my python3.11 version is too high, I need python >=3.8, <3.9. I build new conda environment with python3.9, and tried again. This time it works except plotter.visualize_plot(), so I use plotter.interactive_plot(show_plot=True)instead.

LiuLime avatar Dec 19 '23 01:12 LiuLime

I have fixed this and upgraded to bokeh 3 in the linked PR.

JacksonBurns avatar Jul 09 '24 23:07 JacksonBurns