0
点赞
收藏
分享

微信扫一扫

在python 3.9的环境下,调用time.clock()方法报错:AttributeError: module 'time' has no attribute 'clock'

在python 3.9的环境下,调用time.clock()方法报错:

AttributeError: module 'time' has no attribute 'clock'

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

举报

相关推荐

0 条评论