AttributeError: module 'time' has no attribute 'clock' 1. 原因是:python 3.8以后,time.clock()方法已经移除;从python 3.3开始就已经弃用了,替代的方法是time.perf_counter()