簡體   English   中英

如何在vscode上啟動kernel?

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM