AttributeError: ‘module’ object has no attribute ‘Counter’【解决方法】

今天爱分享给大家带来AttributeError: ‘module’ object has no attribute ‘Counter’【解决方法】,希望能够帮助到大家。
当使用Counter时,出现异常


AttributeError: 'module' object has no attribute 'Counter'

from collections import Counter
ImportError: cannot import name Counter

原因:

版本问题,Counter在 python2.7中才被加入到这个模块,你可能使用了Python2.6或更老的版本

原文链接:https://blog.itblood.com/4538.html,转载请注明出处。
0
家务:House Chores V1.15 AI汉化版[更新][PC+安卓][6.3G] [欧美RPG/汉化/动态]
家务:House Chores V1.15 AI汉化版[更新][PC+安卓][6.3G] [欧美RPG/汉化/动态]
6分钟前 有人购买 去瞅瞅看

站点公告

显示验证码
没有账号?注册  忘记密码?