【发布时间】:2021-12-15 15:53:46
【问题描述】:
我在 Win10 上使用 Anaconda,当我尝试在包含 seaborn 的 localhost 上执行简单单元时,我在 5 秒内收到死内核消息,重新启动后它只是无限执行 sns 绘图单元。 For example in titanic dataset
使用 Collab 或 Binder No problem with collab 没有这样的问题; No problem using Binder, online Jupyter Notebook
似乎我遗漏了一些明显的东西。 代码:
import seaborn as sns
import pandas
import matplotlib.pyplot as plt
df = sns.load_dataset('titanic')
df.head()
sns.countplot(x='sex',data=df)
【问题讨论】:
-
你能检查一下你的seaborn、python和jupyter版本吗?可以在终端使用
conda list查看。 -
@VinsonCiawandy,Seaborn 是 0.11.2,python 是 3.9.7,对于 jupyter: jupyter 1.0.0 ; jupyter_client 7.0.1 ; jupyter_console 6.4.0 ; jupyter_core 4.8.1; jupyterlab_pygments 0.1.2;由于我几个小时前重新安装了操作系统,我想这些是最新版本
-
你可以尝试将python版本降级到
3.8.10或3.7.9吗?即使在今天(2021 年末)Python 3.9 还没有被采用,因为它与库存在许多兼容性问题。 -
你这个周末更新
conda了吗? (例如conda update --all)
标签: python windows matplotlib seaborn jupyter