Hi, I need to run the python script in visual, and to make it an exe file, I need a script or add something to my python script, that when I hit run without debug, it loads the graph without me having to type : bokeh serve --show Graphs.py
How do I do that? please help, I’n not very sure of how to use documentation to make it work. so please add code and tell me exactly where to add it (as dumb).
Unsure, but you could look at making a bokeh server app that requires the server call manually. Something like you see here then use pyinstaller on windows to generate a .exe, but I have no idea if it will actually work, just something to try out maybe.
I can only assume you are trying to give this to someone else to run, which you may want to host your app with login information, and have them pass data from a file, using the FileInput as seen here.
I just want to add: We have made occasional small and non-intrusive commits that users have asked for regarding pyinstaller, and I have heard of some users having some success with pyinstaller, but I should make it clear that anything to do with pyinstaller (or py2exe) is 100 percent “experimental, on your own” territory. We make no claims that Bokeh works with these tools, and there is no testing to maintain any sort of guaranteed compatibility. They are not supported in any official way, you will just have to try and experiment and see what might work.
It might be good to review past issues regarding pysinstaller for any useful information:
That is a good point, I didn’t even think about the issues.
We had used pyinstaller on a matplotlib tool for students in 1st year physics, which was a bloated mess. The file was 300 MiB! Mostly because I didn’t have time to build them something for a lab in bokeh, as I was busy with my own research. It worked, but is was not a good solution in a lot of ways, plus we had a file for each OS (mac required different versions).
Even here, if this is file is to go to a fellow researcher, then maybe a jupyter notebook with panel would be better solution.