You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

VSCode中启动Jupyter Notebook内核失败:无法导入_psutil_linux(疑似循环导入)

解决VSCode中Jupyter内核启动失败(无法导入'_psutil_linux')的方案

这个错误大概率是psutil库损坏或版本不兼容引发的,以下是可尝试的修复步骤:

  • 卸载并重装psutil库
    打开VSCode内置终端,执行对应命令:

    • 使用pip:
      pip uninstall -y psutil
      pip install psutil
      
    • 使用conda环境:
      conda remove -y psutil
      conda install psutil
      
  • 确认Python解释器关联正确
    按下Ctrl+Shift+P(Windows/Linux)或Cmd+Shift+P(Mac),输入Python: Select Interpreter,选择已安装psutil的目标环境。

  • 清理Jupyter内核缓存
    关闭VSCode,找到对应系统的Jupyter内核目录:

    • Windows:%APPDATA%\jupyter\kernels
    • Linux/Mac:~/.local/share/jupyter/kernels
      删除对应环境的内核文件夹后,重新打开VSCode并重建Jupyter内核。
  • 更新VSCode及插件
    将VSCode、Python插件、Jupyter插件更新至最新版本,排除插件兼容性问题。

内容的提问来源于stack exchange,提问作者Exquisite Mong

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.31 06:21:36