python - 使用 seaborn 绘图会导致 python 内核崩溃
问题描述
我在 Win10 上使用 Anaconda,当我尝试在包含 seaborn 的本地主机上执行简单单元时,我在 5 秒内收到死内核消息,重新启动后它只是无限执行 sns 绘图单元。例如在 Titanic 数据集中
使用 Collab 或 Binder没有这样的问题 collab 没有问题; 使用 Binder 没问题,在线 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)
解决方案
推荐阅读
- gtk - Vala GtkTemplate:未找到 UI 资源
- java - 为什么 Java 会舍入我的浮点计算?
- spring - 如何使用 spring Jdbc 模板或其他批量插入数据到带有分区的配置单元表?
- javascript - 服务器和客户端具有相同的主机(localhost),但端口不同(8080、3000)。我可以使用 Access-Control-Allow-Credentials: true 吗?
- boost - 为 boost 安装应用补丁
- vba - DLast 功能固定在特定条目上,而不是最后一个
- mysql - Mysql查询从3个表中选择
- c# - 如何使用相对路径附加 mssql 数据库?
- angular - 组件中不允许 Angular 服务订阅
- css - 悬停变换正在重复