VS Code运行Jupyter报错

问题描述:

今天在电脑中安装了Python3.8.5环境,而后使用pip安装了ipython和jupyter,没想到在VS Code中使用Jupyter Notebook一直有问题,一直报一个错误:“Unable to start session for kernel Python 3.8.5 64-bit . Select another kernel to launch with.”
同时VS Code中Jupyter Server的状态也一直是busy
报错图片

python

缘由分析:

一开始百思不得其解,直接运行jupyter notebook是正常的,后来在github的vscode python插件讨论区找到了答案。
原地址以下:https://github.com/microsoft/vscode-python/issues/13701
这里在本身的博客中也记录下,是由于traitlets 这个包升级的缘由,traitlets 在2020.9.1升级到了5.0版本,能够在https://pypi.org/project/traitlets/#history查看traitlets的版本:
traitlets版本


git

解决方案:

根据github中大佬们的指引,将traitlets这个包的版本降回到4.3.3解决github

python3 -m pip install traitlets==4.3.3 --force-reinstall

有可能会报错,能够pip的时候添加一下国内源就能解决问题session

相关文章
相关标签/搜索