在Python环境中使用Tablib库导出数据到Excel文件时遇到如下报错
“ AttributeError: ‘Dataset’ object has no attribute ‘xls’ ”
尝试搜索解决方案,看到有人推荐使用如下命令
解决方法: pip install tablib[all]
实际运行得到如下错误
(study) mac@MacdeMacBook-Air study % pip3 install tablib[all]
zsh: no matches found: tablib[all]
通过查询Tablib官方文档得到如下
pip install “tablib[xls]”
https://tablib.readthedocs.io/en/stable/formats.html#xls.
实测如下命令也有效
pip install “tablib[all]”
解决tablib库的“ AttributeError: ‘Dataset‘ object has no attribute ‘xls‘ ”报错
于 2023-06-04 15:10:14 首次发布