Skip to content

Failure to start kernel due to failures in importing modules

Don Jayamanne edited this page Mar 14, 2022 · 6 revisions

Python kernels can fail to start if some modules such as pytprocess ipykernel, pyzmq, etc fail to load due to improper installation, or upgrading one module and not the related dependencies or the like.

Sometimes, user code such as os.py or random.py could also prevent the kernel from starting.

Recommended solution

  • Please consider installing the modules that could not be imported.
  • If they have already been installed, its possible it hasn't been installed correct, hence try the reinstall option as follows:
# if using a non-conda environment
python -m pip install <xyz> -U --fore-reinstall
# If using a conda environment
conda install --name <environment name> <xyz> --update-deps --force-reinstall
Clone this wiki locally