在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
命令安装:jupyterlab
、notebook
和voila
- Python 3.9.6 installed
- Installed with
pip
command :jupyterlab
,notebook
andvoila
在 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 namefile:///*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