[英]How to start kernel on vscode?
I've Win11 PC.There is a vscode in it,and,I use Jupyter notebook on vscode.我有Win11 PC。里面有一个vscode,而且,我在vscode上使用Jupyter notebook。 When I connect the Python kernel, It raise an Error(always that, my python3.10 or anconda all will raise that Error.And It's the same things in Jupyter lab.):
当我连接 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).
I installed the Jupyter packages,and this is my Jupyter core packages version:我安装了 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
I searched in Bing,a passages told me the problem is at pyzmq23,I should install pyzmq19.0.2,but it's fail (in my WSL:Ubuntu22.04,pyzmq version is 23,but in WSL Python kernel can run).我在 Bing 中搜索,一段告诉我问题出在 pyzmq23,我应该安装 pyzmq19.0.2,但它失败了(在我的 WSL 中:Ubuntu22.04,pyzmq 版本是 23,但在 WSL 中 Python Z50484C19F1AFDAF3841ZA0D2D 可以运行)。
Why is this?为什么是这样? If you can finish my problem,I would be very grateful.
如果你能解决我的问题,我将不胜感激。 Thank you!
谢谢!
I solved the problem by changing the paths of TEMP and TMP from the C drive to the D drive in the environment variables, because TEMP and TMP are in the C drive by default and are accessed when using Jupyter, however, my username is in Chinese and I don't know why it can't seem to resolve the paths of Chinese usernames and I can't seem to change my username, so I changed their path to the D drive.我通过在环境变量中将C驱动器的TEMP和TMP路径更改为D驱动器解决了这个问题,因为TEMP和TMP默认在C驱动器中,使用Jupyter时可以访问,但是我的用户名是中文的而且我不知道为什么它似乎无法解析中文用户名的路径,我似乎无法更改我的用户名,所以我将它们的路径更改为D盘。 After that it worked fine.
之后它工作得很好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.