Permission Denied error when invoking show()

I started my issue on github: [BUG] Permission Denied error when invoking show() · Issue #11089 · bokeh/bokeh · GitHub

Additionally I tried to install older bokeh, 2.0.0 and 1.0.0 but this error showed anyway.

I don’t know what I can do to resolve this issue.

show saves an HTML output file and it looks like it is trying to save to a directory you do not have permissions to write files to. You should use the output_file function to explicitly provide a path to some location that you do have permission to write files to. You can see it used in a full example here:

bar_basic.py — Bokeh 2.3.0 Documentation

1 Like

Ok, thank you, I understand it now.

When I set output_file I saw no error.

Also when I run vscode as admin, I saw no error.

I checked that bokeh tried to save its output html file exactly to C:\Python39\Lib\runpy.html and I think it is a bug. I believe bokeh shouldn’t try to save any files to Python installation directory.

@qqgg231 it’s not a bug. If you don’t specify anything, then Bokeh attempts to save in the same place as the script. This works great with typical command line usage. Evidently your IDE is doing some wonky things behind the scenes that interfere with that default behavior, but there is nothing we can do about that, and it’s not a reason to remove a useful feature for the majority of users.