Jupyter Notebook无法在VS Code中打开

时间:2018-12-16 13:47:30

标签: python visual-studio-code jupyter-notebook

在设置新系统时,我试图在VS Code上运行我的笔记本文件,但是一旦我打开VS Code,它就会给我这个错误Failed to detect Jupyter Notebook. Please use 'Select Jupyter Notebook' command  在输出中: Unable to determine version of Jupyter, Traceback (most recent call last): File "C:\Anaconda3\Scripts\jupyter-notebook-script.py", line 6, in <module> from notebook.notebookapp import main File "C:\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 46, in <module> from zmq.eventloop import ioloop File "C:\Anaconda3\lib\site-packages\zmq\__init__.py", line 47, in <module> from zmq import backend File "C:\Anaconda3\lib\site-packages\zmq\backend\__init__.py", line 40, in <module> reraise(*exc_info) File "C:\Anaconda3\lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise raise value File "C:\Anaconda3\lib\site-packages\zmq\backend\__init__.py", line 27, in <module> _ns = select_backend(first) File "C:\Anaconda3\lib\site-packages\zmq\backend\select.py", line 27, in select_backend mod = __import__(name, fromlist=public_api) File "C:\Anaconda3\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in <module> from . import (constants, error, message, context, ImportError: DLL load failed: The specified module could not be found.

我已经安装了所有必要的插件,运行了各种命令,还更新了笔记本。 conda install notebook

我正在使用: 水蟒3 与代码1.26.1 窗户10 我无法启动新笔记本或使用现有笔记本。 请帮忙,如果需要更多信息,请告诉我。

3 个答案:

答案 0 :(得分:0)

这是由于运行jupyter而不首先为Python 3.7激活环境。这是扩展程序2018.12.0版本中的fixed

答案 1 :(得分:0)

  1. 检查在vscode中安装的必需扩展。

  2. 使用pip在您的python venv中安装jupyter和ipython软件包:

     pip install jupyter
     pip install ipython
    
  3. 如果仍然无法正常工作,请尝试更改ipynb笔记本右上角的python内核。

答案 2 :(得分:0)

当此响应失败时,您可以卸载condajupyter并从VS Code安装python,然后进行更新。不一定要安装condajupyter