I’m new to Bokeh, currently on tutorial to learn how to use it, there’s some examples need to load tutorial data, when I run from tutorial_data import data, I encounter ModuleNotFoundError: No module named ‘tutorial_data’. Do I need to install it and how, thanks in advance.
Hi @songdg I think you are either looking at a very old tutorial, or one that was created by people outside the project. The current tutorial notebooks that are actually maintained by us do not use any module with that name and are located in this repo:
GitHub - bokeh/tutorial: Notebooks and presentation materials for Bokeh tutorials
Edit: it looks like the free external mybinder.org service that we recommended to run the notebooks online has finally died. You’ll want to clone the tutorial repo above and run the notebooks locally. Let us know if you need any assistance with that.
Thanks, what I was reading is exactly from mybinder.org service which is offline now.
@songdg we used mybinder links for nearly a decade, and old links to old versions would work as long as mybinder itself was still running. I think you somehow came across a very old direct link to an old version of the tutorial. There was a version of the tutorials that had that module, but it was removed many years ago now. Your best bet is to use repository linked above, since that is always guaranteed to be up to date.
Now Bokeh Tutorial is back online, what I was asking is how to get the tutorial data, which is the first line in this page 04 Basic Plotting.
# load tutorial data
from tutorial_data import data
@songdg I’m not sure why my code search on GH did not turn up that module import. It is in the repo I already linked:
tutorial/notebooks/tutorial_data.py at main · bokeh/tutorial · GitHub
But all that module does is make it easier to load some things from the data
directory one level up. You will need that directory as well. So my earlier advice still holds, i.e. you should clone the notebook repo and run locally from there.
I don’t know why things are not working on mybinder, but we have abandoned mybinder as a recommended way to run the tutorial, so the question is moot.
All right, thanks