昨天用matplotlib画图时出了问题,一直出错:'module' object has no attribute 'pyplot'
今天把python删了重装依然如故,仔细看了下message才发现,matplotlibv.pyplot调用了一个名叫new的模块,
恰好我的工作目录也有new.py的文件,把它删了,一切正常。
这不知道算不算bug
...全文
1659打赏收藏
教训,python文件名不能乱起
昨天用matplotlib画图时出了问题,一直出错:'module' object has no attribute 'pyplot' 今天把python删了重装依然如故,仔细看了下message才发现,matplotlibv.pyplot调用了一个名叫new的模块, 恰好我的工作目录也有new.py的文件,把它删了,一切正常。 这不知道算不算bug