☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Bokeh 2.0.0 and PyInstaller

Community Support
dan.cutright
dan.cutright

I am unable to successfully create a pyinstaller executable with bokeh==2.0.0, I get the following error:
FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/w9/59qs933d4dq1j2214v_dz1sr0000gn/T/_MEI8f9v8X/bokeh/_sri.json'

All else the same, no issues with bokeh==1.4.0. Perhaps the hook needs an update? Any ideas?

I’m on macOS 10.14.6
Python 3.6
PyInstaller-4.0.dev0+96897fc78d

⌁   Link to post
Bryan
Bryan

_sri.json is a new file that must be present in the package. Most likely the PyInstaller configuration or manifest will need to be updated, but that’s the beginning and end of my pyinstaller knowledge.

⌁   Link to post
Bryan
Bryan

And this is good to know. I was planning to split up the single big _sri.json file into separate files for every release but it seems like that would impose a pretty unpleasant burden for the installer maintainers unless theres is some way to specify patterns for including in the manifest

⌁   Link to post
dan.cutright
dan.cutright

I’ve posted over on the PyInstaller google user’s group, but it’s my first post and it’s moderated… so it’s not showing up yet.

BUT I was able to get PyInstaller to work. PyInstaller comes with a bunch of preset “hooks” which are basically extra instructions per library. I went to site-packages/PyInstaller/hooks/hook-bokeh.py which is the following for the latest PyInstaller dev:

from PyInstaller.utils.hooks import collect_data_files

# core/_templates/*
# server/static/**/*
# subcommands/*.py

datas = collect_data_files('bokeh.core') + \
        collect_data_files('bokeh.server') + \
        collect_data_files('bokeh.command.subcommands', include_py_files=True)

I simply changed to:

datas = collect_data_files('bokeh.core') + \
        collect_data_files('bokeh.server') + \
        collect_data_files('bokeh.command.subcommands', include_py_files=True) + \
        collect_data_files('bokeh')

There might an easier way (or more efficient / light-weight?). But at least it works. I’m pretty sure I could add collect_data_files('bokeh') somewhere in my .spec file instead, but I’m fairly new to PyInstaller.

⌁   Link to post

End of archived discussion · Replies are disabled