简体   繁体   English

VSCode GitHub 远程仓库 Python 笔记本本地 Kernel

[英]VSCode GitHub remote repository with Python Notebook Local Kernel

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.有没有人设法使用本地 kernel 运行 ipynb Python 笔记本,但使用 GitHub 存储库扩展连接到远程 GitHub 存储库。

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.我可以直接从 GitHub 存储库打开 ipynb 文件,但无法连接到 kernel,因为它似乎找不到要运行的笔记本的本地缓存版本。

Error message:错误信息:

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

Using: MacOS使用:苹果操作系统

VSC 1.66 VSC 1.66

GitHub Repositories extension v0.28.0 GitHub 存储库扩展 v0.28.0

Tried multiple Python kernels.尝试了多个 Python 内核。

Anyone got any ideas?有人有什么想法吗?

I am using windows, and it works well on my side.我使用的是 windows,在我这边效果很好。 I think this extension works well with the local python environment.我认为此扩展适用于本地 python 环境。

The problem you have run across looks like the problem of jupyter configuration.您遇到的问题看起来像是 jupyter 配置的问题。 You can execute jupyter --paths to get the jupyter configuration path.您可以执行jupyter --paths来获取 jupyter 配置路径。 It should be “/Users/UserName/.jupyter/jupyter_notebook_config.py” on the MacOs.在 MacO 上应该是“/Users/UserName/.jupyter/jupyter_notebook_config.py” You can refer to here for the details of jupyter_notebook_config.py . jupyter_notebook_config.py的详细信息可以参考 这里

Then you need to modify c.NotebookApp.notebook_dir = to a existing path or just comment it.然后你需要修改c.NotebookApp.notebook_dir =到现有路径或只是注释它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM