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

M1 MacBook Pro上VSCode中Jupyter Notebook服务器启动失败:OSError: [Errno 49]

解决M1 MacBook Pro上VSCode Jupyter内核启动失败(Errno 49)的方案
  • 强制Jupyter绑定本地回环地址

    1. 进入项目目录,在终端执行 poetry run jupyter notebook --generate-config 生成配置文件
    2. 打开 ~/.jupyter/jupyter_notebook_config.py,找到 c.ServerApp.ip 配置项,取消注释并修改为:c.ServerApp.ip = '127.0.0.1'
    3. 保存文件后重启VSCode,重新启动Jupyter内核
  • 临时禁用IPv6测试
    在终端执行 sudo sysctl -w net.inet6.ip6.enable=0,禁用后重启VSCode尝试启动内核。如果有效,可永久修改:编辑 /etc/sysctl.conf,添加 net.inet6.ip6.enable=0,再执行 sudo sysctl -p 生效

  • 调整VSCode Jupyter扩展配置

    1. 打开VSCode设置,搜索 Jupyter: Server Connection Timeout,将超时时间调整为60000毫秒(或更长)
    2. 搜索 Jupyter: Use Legacy Kernel,勾选启用,重启VSCode后重试
  • 检查Jupyter版本兼容性

    1. 执行 poetry show jupyter 查看当前版本,若版本过高,执行 poetry add jupyter==1.0.0 降级到适配Python3.11的稳定版
    2. 重新安装依赖:poetry install --no-root,完成后重启VSCode

内容的提问来源于stack exchange,提问作者Brian of London

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.29 10:55:05