I’m a veterinary student pursuing a study in epidemiology. I’m trying to use the Emulsion framework which is a python-based software.

I tried installing it by the letter but when i try to run a test simulation, this is what is displayed:

Traceback (most recent call last):
  File "c:\users\dell\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\dell\appdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\DELL\AppData\Local\Programs\Python\Python39\Scripts\emulsion.exe\__main__.py", line 4, in <module>
  File "c:\users\dell\appdata\local\programs\python\python39\lib\site-packages\emulsion\__main__.py", line 185, in <module>
    from   emulsion.tools.plot          import plot_outputs
  File "c:\users\dell\appdata\local\programs\python\python39\lib\site-packages\emulsion\tools\plot.py", line 70, in <module>
    from   bokeh.layouts                import gridplot, column, widgetbox
ImportError: cannot import name 'widgetbox' from 'bokeh.layouts' (c:\users\dell\appdata\local\programs\python\python39\lib\site-packages\bokeh\layouts.py)

can anyone help me out?

>Solution :

ImportError: cannot import name ‘widgetbox’ from ‘bokeh.layouts’

Looks like widgetbox was removed from bokeh in version 3.0.0.

The most recent version of bokeh which has widgetbox is 2.4.3.

The tool pip can be used to install specific versions of a package:

pip install bokeh==2.4.3

Leave a Reply