简体   繁体   中英

Jupyter notebook not opening in VS Code

While setting up my new system, I am trying to run my notebook file on VS Code but as soon as I open VS Code it give me this error

Failed to detect Jupyter Notebook. Please use 'Select Jupyter Notebook' command

in the output:

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.

I have installed all the plugins which were necessary, ran various commands, I also updated the notebook. conda install notebook

I am using: anaconda 3 vs code 1.26.1 windows 10 I cant start new notebooks or use an existing one either. Please help, and let me know if any more information is required.

  1. Check the required extensions installed in vscode.

  2. install jupyter and ipython packages in your python venv using pip:

     pip install jupyter pip install ipython
  3. If its still not working try to change the python kernal in the top right corner of ipynb notebook.

This is due to running jupyter without first activating the environment for Python 3.7. This was fixed in the 2018.12.0 release of the extension.

When it fails with this response you can uninstall conda and jupyter and install python from VS Code and then update. Don't necessarily install conda and jupyter .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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