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

Windows系统Python3.9环境运行Jupyter Notebook报错求助

报错现象

全新安装Python和Jupyter Notebook后启动服务触发导入类报错,报错截图如下:
报错截图

报错根因

Jupyter Notebook旧版本依赖markupsafe库的soft_unicode方法,而markupsafe 2.1.0及以上版本官方移除了该方法,导致版本不兼容触发报错。

解决步骤
  • 卸载当前安装的高版本markupsafe
    pip uninstall markupsafe -y
  • 安装兼容的2.0.1版本markupsafe
    pip install markupsafe==2.0.1
  • 重新执行启动命令即可正常运行Jupyter Notebook
    jupyter notebook

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.09.28 09:27:00