'seaborn' is not a valid package style, path of style file, URL of style file, or library style name (library styles are listed in `style.available`)
调用Matplotlib内置样式时报错:
首先尝试网络常见的解决办法
检查安装seaborn:
pip install seaborn
然后在代码当中调用:
import seaborn
发现依旧报错
换一个样式:
plt.style.use('seaborn-darkgrid')
还是报错!
搜索无果,老办法:查询源头的可用样式列表
plt.style.available
结果发现
应该是更新了吧,没有“seaborn”只有“seaborn-v0_8”,修改代码
plt.style.use('seaborn-v0_8')
调用成功!!!
t