导入ezsheets时出现ImportError:无法从google.auth导入credentials的解决咨询
解决ezsheets导入时的google.auth凭据错误
- 卸载当前安装的google-auth包:
pip uninstall google-auth -y - 安装与ezsheets兼容的旧版google-auth(验证可用版本为1.35.0):
pip install --user google-auth==1.35.0 - 重新执行
import ezsheets尝试导入 - 若仍有问题,可彻底重装ezsheets:
pip uninstall ezsheets -y pip install --user ezsheets
原因说明
新版google-auth调整了模块结构,不再支持从google.auth直接导入credentials,而ezsheets的代码尚未适配这一变更,因此安装兼容的旧版本google-auth即可解决该导入错误。
内容的提问来源于stack exchange,提问作者domigmr
相关产品推荐
相关产品推荐

