在Visual Studio Code上打开ipynb,显示json [英] Open ipynb on Visual Studio Code, display json

查看:286
本文介绍了在Visual Studio Code上打开ipynb,显示json的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我打开一个 ipynb 文件时,我只看到一个 json 文件.我测试了所有文件:
https://github.com/MicrosoftLearning/mslearn-ai900.git

When I open an ipynb file, I just see a json file. I tested with all files of :
https://github.com/MicrosoftLearning/mslearn-ai900.git

我的机器上有:

  • 已安装 Python 3.9.6
  • 使用 pip 命令安装:jupyterlabnotebookvoila
  • Python 3.9.6 installed
  • Installed with pip command : jupyterlab, notebook and voila

在 Visual Studio Code(版本 1.59.0)上:

On Visual Studio Code (version 1.59.0) :

  • Python 3.9.6 64 位 是当前的解释器.
  • 我可以创建一个新笔记本:"CTRL+SHIFT+P -->Jupyter:创建新的空白笔记本"我在右下角看到了Jupyter Server:local".我可以执行代码:print("Hello, Python!"),但是当我尝试保存文件时,出现此错误:
    无法注册Untitled-1":Jupyter 不支持文件名 file:///*ThePathToSave*/Test.ipynb.
  • Python 3.9.6 64-bit is the current interpreter.
  • I can create a new notebook : "CTRL+SHIFT+P --> Jupyter : Create new blank notebook" and I saw on the down-right "Jupyter Server:local". I can execute code : print("Hello, Python!"), but when I try to save file, I have this error :
    Failed to register 'Untitled-1' : File name file:///*ThePathToSave*/Test.ipynb is not supported by Jupyter.

已安装扩展:

  • Jupyter v2021.8.1195043623
  • Pylance v2021.8.1
  • Python v2021.8.1105858891

内核列表:(command) jupyter kernelspec list

Available kernels:
  .net-csharp        C:\Users\antho\AppData\Roaming\jupyter\kernels\.net-csharp
  .net-fsharp        C:\Users\antho\AppData\Roaming\jupyter\kernels\.net-fsharp
  .net-powershell    C:\Users\antho\AppData\Roaming\jupyter\kernels\.net-powershell
  python3            c:\python\python39\share\jupyter\kernels\python3

感谢您的帮助.

推荐答案

我重新安装了所有 Visual Studio Code.
我按照这个答案完全"卸载了 VS Code:
https://debug.to/1074/how-to-uninstall-vs代码完全
之后,我重新安装了 Visual Studio Code.
现在我可以打开所有文件了.

I re-install all Visual Studio Code.
I followed this answer to uninstall 'completely' VS Code :
https://debug.to/1074/how-to-uninstall-vs-code-completely
and after, I re-install Visual Studio Code.
Now I can open all files.

感谢@IanHuff

这篇关于在Visual Studio Code上打开ipynb,显示json的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆