oku*_*oub 50 pandas jupyter jupyter-notebook ipywidgets pandas-profiling
我正在使用 jupyter 笔记本并安装。
ipywidgets==7.4.2 widgetsnbextension pandas-profiling=='.0.0
Run Code Online (Sandbox Code Playgroud)
我也跑了:
!jupyter nbextension enable --py widgetsnbextension
Run Code Online (Sandbox Code Playgroud)
但运行时:
from pandas_profiling import ProfileReport
profile = ProfileReport(df, title="Pandas Profiling Report", explorative=True)
profile.to_widgets()
Run Code Online (Sandbox Code Playgroud)
我收到错误:
ImportError: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
Run Code Online (Sandbox Code Playgroud)
知道为什么吗?尝试了建议的解决方案。
小智 53
我在新环境中尝试了你提到的所有内容,conda并且遇到了另一个与版本相关的问题ipywidgets(在 Github 中发现的一个错误,评论说使用上一个版本后已解决)。我解决了安装最新版本的ipywidgets. 这是我的过程:
conda使用(我使用 miniconda)创建一个新环境:conda create --name teststackoverflow python=3.7
Run Code Online (Sandbox Code Playgroud)
conda activate teststackoverflow
Run Code Online (Sandbox Code Playgroud)
jupyter:pip install jupyter
Run Code Online (Sandbox Code Playgroud)
pip install ipywidgets widgetsnbextension pandas-profiling
Run Code Online (Sandbox Code Playgroud)
jupyter notebook在控制台中运行以打开笔记本服务器并创建一个新笔记本。!jupyter nbextension enable --py widgetsnbextension
Run Code Online (Sandbox Code Playgroud)
结果:
Enabling notebook extension jupyter-js-widgets/extension...
- Validating: OK
Run Code Online (Sandbox Code Playgroud)
df:conda create --name teststackoverflow python=3.7
Run Code Online (Sandbox Code Playgroud)
conda activate teststackoverflow
Run Code Online (Sandbox Code Playgroud)
Avi*_*dan 27
这在你的 virtualenv 运行中对我有用(对于所有喜欢 pip 而不是 conda 的人..)
pip install ipywidgets
jupyter nbextension enable --py widgetsnbextension
Run Code Online (Sandbox Code Playgroud)
或者,如果您喜欢在笔记本中运行它
!pip install ipywidgets
!jupyter nbextension enable --py widgetsnbextension
Run Code Online (Sandbox Code Playgroud)
并在你的笔记本中添加
from ipywidgets import FloatProgress
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
116029 次 |
| 最近记录: |