Python教程

Python解决AttributeError: module ‘matplotlib‘ has no attribute ‘get_data_path‘问题

本文主要是介绍Python解决AttributeError: module ‘matplotlib‘ has no attribute ‘get_data_path‘问题,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

import matplotlib.pyplot as plt时,
报错显示AttributeError: module 'matplotlib' has no attribute 'get_data_path'
请添加图片描述
检查了一下目前matplotlib的版本是3.4.3,出现包导入错误可能是系统或package升级的原因,多尝试一下降低package的版本就好。
试了一下3.3.1 和3.3.4版本,最后3.3.4版本可以完美解决上述报错~

这篇关于Python解决AttributeError: module ‘matplotlib‘ has no attribute ‘get_data_path‘问题的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!