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

升级TensorFlow 2.6失败后启动Jupyter Notebook报KernelProvisionerBase导入错误

问题原因

该错误由jupyter_client包版本不兼容或文件损坏导致,KernelProvisionerBase是jupyter_client 7.0及以上版本才引入的类,升级TensorFlow过程中依赖冲突拉低了jupyter_client版本,或是损坏了其安装文件,就会触发该导入错误。

解决方案
  • 第一步:激活目标conda环境
    执行命令:conda activate forecast
  • 第二步:卸载损坏的jupyter_client包
    执行命令:conda remove jupyter_client -y
  • 第三步:安装符合版本要求的jupyter_client
    优先使用conda安装:conda install "jupyter_client>=7.0" -y
    若conda源无对应版本,改用pip安装:pip install --upgrade jupyter_client
  • 第四步:修复jupyter其余关联依赖
    执行命令:conda install jupyter notebook -y
  • 第五步:验证修复结果
    执行命令:jupyter notebook,确认可以正常启动
兜底方案:重建环境

如果上述操作后问题仍存在,说明环境内多依赖冲突已经较难逐一修复,可直接重建环境:

  • 导出当前环境的依赖清单备份:conda env export > forecast_backup.yml
  • 删除损坏的环境:conda env remove -n forecast -y
  • 从备份文件重建环境:conda env create -f forecast_backup.yml
  • 重建完成后重新安装TensorFlow 2.6,安装时优先使用官方源,避免再次出现依赖冲突

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.09.26 06:24:04