Memchache报错:AttributeError: module 'memcache' has no attribute 'Client'
Python环境使用Memcache时,出现如下报错:
AttributeError: module 'memcache' has no attribute 'Client'
如果搜索百度,给出的理由是,应该安装pymemcache,但是实际只是增加了client的函数。
memcache相关的package,包括 memcache、pymemcache、python-memcached。
为了实现下面的memcache调用方式
memcache.Client(self.queue_list, debug=0)
应该使用python-memcached包,在文章 https://www.cnblogs.com/chenli0513/archive/2011/04/21/2023739.html,也有类似的使用方法。
浙公网安备 33010602011771号