VSCODE使用打开ipynb文件的问题

版权声明:本文为博主原创文章,转载请联系作者 https://blog.csdn.net/u013832707/article/details/82828199

前言

jupyter可以一段一段的运行python代码并且保存中间结果,用着十分方便。结合vscode更是舒服。博主在vscode下打开ipynb文件遇到了一些问题,特此记录

环境

vscode:1.27.2
python:3.5
jupyter:4.4.0

插件安装

首先,博主安装了Visual Studio Code Tools for AI插件
安装方法:
打开extensions选项卡
在搜索栏输入:ext:ipynb
选择安装即可
之后,在ipynb文件右键就有在jupyter服务器中打开的选项

问题

已经安装了python和jupyter,但是就是报错

修改PythonPath变量:打开File->preferences->settings, 以.json方式显示,查找python.pythonPath, 修改其为"python.pythonPath": “python安装路径\pythonw.exe”,

右键打开没有显示

确保目录:(用户名)\.jupyter\下存在jupyter_notebook_config.json
并且其内容为:
{
“NotebookApp”: {
“tornado_settings”: {
“headers”: {
“Content-Security-Policy”: "frame-ancestors file://* "
}
}
}
}

猜你喜欢

转载自blog.csdn.net/u013832707/article/details/82828199
今日推荐