在python 3.9的环境下,调用time.clock()方法报错:
AttributeError: module 'time' has no attribute 'clock'
原因是:python 3.8以后,time.clock()方法已经移除;从python 3.3开始就已经弃用了,替代的方法是time.perf_counter()
在python 3.9的环境下,调用time.clock()方法报错:AttributeError: module 'time' has no attribute 'clock'
阅读 139
2022-05-24
在python 3.9的环境下,调用time.clock()方法报错:
AttributeError: module 'time' has no attribute 'clock'
原因是:python 3.8以后,time.clock()方法已经移除;从python 3.3开始就已经弃用了,替代的方法是time.perf_counter()
相关推荐
精彩评论(0)