[英]How to start kernel on vscode?
我有Win11 PC。里面有一个vscode,而且,我在vscode上使用Jupyter notebook。 当我连接 Python kernel 时,它会引发错误(总是这样,我的 python3.10 或 anconda 都会引发该错误。这在 Jupyter 实验室中也是一样的。):
Failed to start the Kernel.
d:\python3.10\lib\site-packages\traitlets\traitlets.py:2392: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.
warn(
d:\python3.10\lib\site-packages\traitlets\traitlets.py:2346: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'ecf4c84b-3c42-491a-8c1a-a92fb5e8d52c' instead of 'b"ecf4c84b-3c42-491a-8c1a-a92fb5e8d52c"'.
warn(
Bad file descriptor (C:\projects\libzmq\src\epoll.cpp:100).
我安装了 Jupyter 包,这是我的 Jupyter 核心包版本:
Selected Jupyter core packages...
IPython : 8.4.0
ipykernel : 6.13.0
ipywidgets : 7.7.0
jupyter_client : 7.3.4
jupyter_core : 4.11.1
jupyter_server : 1.6.4
jupyterlab : 3.3.4
nbclient : 0.6.2
nbconvert : 6.5.0
nbformat : 5.4.0
notebook : 6.4.11
qtconsole : 5.3.0
traitlets : 5.3.0
我在 Bing 中搜索,一段告诉我问题出在 pyzmq23,我应该安装 pyzmq19.0.2,但它失败了(在我的 WSL 中:Ubuntu22.04,pyzmq 版本是 23,但在 WSL 中 Python Z50484C19F1AFDAF3841ZA0D2D 可以运行)。
为什么是这样? 如果你能解决我的问题,我将不胜感激。 谢谢!
我通过在环境变量中将C驱动器的TEMP和TMP路径更改为D驱动器解决了这个问题,因为TEMP和TMP默认在C驱动器中,使用Jupyter时可以访问,但是我的用户名是中文的而且我不知道为什么它似乎无法解析中文用户名的路径,我似乎无法更改我的用户名,所以我将它们的路径更改为D盘。 之后它工作得很好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.