-
Notifications
You must be signed in to change notification settings - Fork 294
Troubleshooting (WIP)
Don Jayamanne edited this page Mar 14, 2022
·
14 revisions
We're sorry you're having trouble and looking for a solution here.
This document tries to help users get unblocked when running into issues.
Hopefully the following simple checklist would suffice:
- Verify you are on the latest version of VS Code and Jupyter extension.
- The issue may have already been fixed, please consider trying the pre-release version of the Jupyter extension.
- Try updating the packages to the latest version. If this isn't possible try creating a new environment (virtual environment or a Conda environment) and try again.
- Verify you are not using an outdated/unsupported version of Python (see here https://endoflife.date/python)
- Please review some of the below sections to try and get the issue resolved.
If all else fails, consider Ask question on the discussion channel or file an issue and we'd be happy to help you get unblocked.
- Confirm the Python extension has been installed when working with Python kernels.
- If the Python Environment cannot be found in the list of kernels, verify this is listed in the list of Python Interpreters you get when you select the command
Python: Select Interpreter
. If the Python environment in question is not listed in there either, then its unlikely to be listed in the list of Kernels. Please file an issue against the Python extension here and we'll be happy to look into this issue and get you unblocked.
- Running cells with 'Python 3.8.12 ('.venvClean': venv)' requires ipykernel package
- The kernel failed to start due to an error with the Win32api module. Consider (re) installing this module.
- The kernel failed to start as the dll 'xyz' could not be loaded.
- The kernel failed to start as a dll could not be loaded.
- The kernel failed to start due to an outdated version of IPython. Consider updating this module to the latest version.
- The kernel failed to start due to an outdated version of IPyKernel. Consider updating this module to the latest version.
- The kernel failed to start due to an error with the 'pyzmq' module. Consider re-installing this module.
- The kernel failed to start as 'xyz' could not be imported from 'abc'.
- The kernel failed to start as the module 'xyz' could not be imported.
- The kernel failed to start due to the missing module 'xyz'. Consider installing this module.
- Failed to start Jupyter in the environment 'xyz' possibly due to an outdated version of 'traitlets'. Consider updating the 'traitlets' module to '5.1.1' or later.
- The file 'xyz.py' seems to be overriding built in modules and interfering with the startup of the kernel. Consider renaming the file and starting the kernel again
- ipykernel & other dependencies are installed, yet I am asked to install these dependencies
- Kernels fail to start as ports are blocked
For a full list of all known issues, please see the list of issues here.
Please up-vote these issues to help us prioritize getting these addressed.
Some of the more common known issues are documented here.
- Python packages do not load
- Verify the python package has been installed ... shell/python commands
- Verify the python package can be loaded in the REPL ... shell/python commands
- Verify the right kernel (Python environment) has been used to run the notebook. ... import sys... sys.executable
- Kernel crashes when running some code
- Verify you do not have any python files that could potentially override built-in modules such as
os.py
,random.py
,email.py
, and the like. .. what are built in modules, how to find them, and what to do. - Verify the kernel does not always crash, and only crashes when running a specific cell or using a specific kernel. This helps narrow down the issue to a specific package or environment.
- It has been observed that some packages (such as
tensorflow
) if incorrectly installed or found to be outdated, can result in the kernel crashing. .. instructions to properly install tensorflow - Please verify the same code runs successfully in Jupyter Notebooks or Jupyter Lab. If it fails there too, please consider updating the packages to the latest versions or filing an issue against the corresponding repo or the like. .. instructions for installing jupyter and testing the output..
- Review the output in the
Jupyter
output panel to understand why the kernel may have crashed. The logs generally point to a Python package that caused the kernel to crash. ... instructions for jupyter output panel & how to get to it..
- Verify you do not have any python files that could potentially override built-in modules such as
- Built in modules overridden by user code .. Remove this, but ensure the target page has details on what user needs to do
- Contribution
- Source Code Organization
- Coding Standards
- Profiling
- Coding Guidelines
- Component Governance
- Writing tests
- Kernels
- Intellisense
- Debugging
- IPyWidgets
- Extensibility
- Module Dependencies
- Errors thrown
- Jupyter API
- Variable fetching
- Import / Export
- React Webviews: Variable Viewer, Data Viewer, and Plot Viewer
- FAQ
- Kernel Crashes
- Jupyter issues in the Python Interactive Window or Notebook Editor
- Finding the code that is causing high CPU load in production
- How to install extensions from VSIX when using Remote VS Code
- How to connect to a jupyter server for running code in vscode.dev
- Jupyter Kernels and the Jupyter Extension