IProgress not found. Please update jupyter and ipywidgets.Transformers 导入预训练模型报错

IProgress not found. Please update jupyter and ipywidgets.Transformers 导入预训练模型报错,第1张

IProgress not found. Please update jupyter and ipywidgets.Transformers 导入预训练模型报错 项目场景:

使用Huggingface的Transformers第一次导入预训练模型的时候会报这个错。


问题描述:

第一次运行demo的时候需要下载预训练模型,接着就会卡在这一步。网上看了一些,说什么卸载jupyter重装、或者重新安装ipywidgets的,都不管用。

importError:IProgress not found. Please update jupyter and ipywidgets.

原因分析:

本质上却少了相关的包,直接pip install IProgress或者是conda install IProgress并不能解决问题,其实这个报错后面有提示,去看官方文档就可以解决这个问题:Installation — Jupyter Widgets 7.6.5 documentation


解决方案:

 官方文档说的很清楚:如果你的jupyter和你运行代码的kernel不是一个环境的话,按底下这么做就行。

第一步,在base环境运行:

conda install -c conda-forge widgetsnbextension

第二步,进入你的虚拟环境并运行(py36是你虚拟环境的名字,自行替换):

source activate py36
conda install -c conda-forge ipywidgets

或者直接像官方文档图那样的直接安装到指定名字的环境里面也行。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5443173.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-12-11
下一篇2022-12-11

发表评论

登录后才能评论

评论列表(0条)

    保存