创建树映射的一段代码以前有效,现在不再有效。我使用的Spyder IDE是我与Anaconda一起安装的
import matplotlib.pyplot as plt
import squarify
squarify.plot(
sizes=[13,22,35,5],
label=["group A", "group B", "group C", "group D"],
)
plt.axis('off')
plt.show()
当我运行代码时,它抛出以下错误:
AttributeError: module 'squarify' has no attribute 'plot'
我不知道我有什么改变,代码不再工作了。我可以运行其他matplotlib
***更新***
我发现一个源建议我应该运行pip3 install -U matplotlib
,这会产生另一个错误
WARNING: Error parsing requirements for descartes: [Errno 2] No such file or directory: 'c:\\users\\USER\\anaconda3\\envs\\uba\\lib\\site-packages\\descartes-1.1.0.dist-info\\METADATA'
我可以通过删除文件夹descartes-1.1.0.dist-info
并重新安装笛卡尔来修复这个错误。但是,初始squairy错误仍然存在
目前没有回答
相关问题 更多 >
编程相关推荐