'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.
Solution 1:[1]
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.
Solution 2:[2]
Check the required extensions installed in vscode.
install jupyter and ipython packages in your python venv using pip:
pip install jupyter pip install ipython
If its still not working try to change the python kernal in the top right corner of ipynb notebook.
Solution 3:[3]
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
.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Brett Cannon |
Solution 2 | vishnuteja |
Solution 3 | Ruli |