The kernel failed to start due to the missing module ‘ipykernel_launcher‘. Consider installing this

安装 ptyprocess、ipykernel、pyzmq

  • 问题描述
  • 原文链接
  • 解决方法

问题描述

The kernel failed to start due to the missing module 'ipykernel_launcher'. 
Consider installing this module. 
View Jupyter [log](command:jupyter.viewOutput) for further details.

下面的弹窗中点击**《获取更多》**就好了

原文链接

https://github.com/microsoft/vscode-jupyter/wiki/Failure-to-start-Kernel-due-to-Modules-not-installed

其实答案就在谜面上,我是在vscode中用jupyter写pytorch出现这个错误。
但是我的网络访问GitHub时不稳定,总是跳404.
导致我错过了很多次

解决方法

# 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

比如你是conda来操作环境,你需要更新ipykernel
你可以这么写

conda install -n 环境名字 --update-deps ipykernel

这是原网页
The kernel failed to start due to the missing module ‘ipykernel_launcher‘. Consider installing this_第1张图片
The kernel failed to start due to the missing module ‘ipykernel_launcher‘. Consider installing this_第2张图片

你可能感兴趣的:(vscode,pytorch)