VSCode GitHub remote repository with Python Notebook Local Kernel

216 views Asked by At

Has anyone managed to run an ipynb Python notebook using a local kernel but connecting to a remote GitHub repository using the GitHub Repositories extenstion.

I can open the ipynb file directly from the GitHub repo but cannot connect to a kernel because it doesn't seem to find the local cached version of the notebook to run.

Error message:

[C 10:22:20.876 NotebookApp] Bad config encountered during initialization: No such notebook dir: ''/githubuser/reponame''

Using: MacOS

VSC 1.66

GitHub Repositories extension v0.28.0

Tried multiple Python kernels.

Anyone got any ideas?

1

There are 1 answers

1
Steven-MSFT On

I am using windows, and it works well on my side. I think this extension works well with the local python environment.

The problem you have run across looks like the problem of jupyter configuration. You can execute jupyter --paths to get the jupyter configuration path. It should be “/Users/UserName/.jupyter/jupyter_notebook_config.py” on the MacOs. You can refer to here for the details of jupyter_notebook_config.py.

Then you need to modify c.NotebookApp.notebook_dir = to a existing path or just comment it.