enter image description here在通过 Vs Code 在 Flask 和 python 中编码时,我遇到了屏幕截图中的错误。我的本地服务器宕机了。我在几个地方读到不再使用 time.clock() 方法,我没有关于当前方法的任何信息。将在何处使用当前的方法?
错误: 从时间导入时钟作为刻度 导入错误:无法从“时间”(未知位置)导入名称“时钟”
答案 0 :(得分:0)
由于弃用了 clock
使用 time.clock
的更改 time.perf_counteror
或
将 import
语句更改为 from time import perf_counteror as tick