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

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

原因: Python ≥ 3.8时,不再支持time.clock。

解决方案:

  1. ctrl+单击最后一行,跳转到问题根源地方。
  2. 将 time.clock 更改为 time.perf_counter()

 就解决啦!

猜你喜欢

转载自blog.csdn.net/qq_45670495/article/details/140937730