简体   繁体   English

AttributeError:未找到模块“时间”没有属性“时钟”

[英]AttributeError: not found module 'time' has no attribute 'clock'

Traceback (most recent call last):
  File "D:\Mata Kuliah\Semester VI\Bahan Sistem Tersebar\concurrent_futures_pooling.py", line 20, in <module>   
    start_time = time.clock()
AttributeError: module 'time' has no attribute 'clock'

The time built-in module indeed doesn't have a clock() export in Python 3.8. time内置模块在 Python 3.8 中确实没有clock()导出。

You'll need to adapt your (apparently Python 2 or 3.x (where x < 8) compatible) code to be compatible with Python 3.8.您需要调整您的(显然是 Python 2 或 3.x(其中 x < 8)兼容)代码以与 Python 3.8 兼容。

time.clock() was generally used for high-resolution "stopwatch" timing. time.clock()通常用于高分辨率“秒表”计时。 The replacement in Python 3.3+ is time.perf_counter() . Python 3.3+ 中的替换是time.perf_counter()

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AttributeError:模块“时间”没有属性“时钟”聊天机器人 - AttributeError: module 'time' has no attribute 'clock' chatterbot Chatterbot:AttributeError:模块“时间”没有属性“时钟” - Chatterbot : AttributeError: module 'time' has no attribute 'clock' AttributeError:模块“时间”没有属性“时钟” - AttributeError: module 'time' has no attribute 'clock' 解决方案 - AttributeError: module 'time' has no attribute 'clock' - Solution for - AttributeError: module 'time' has no attribute 'clock' Jupyter 笔记本未启动 - AttributeError:模块“时间”没有属性“时钟” - Jupyter notebook is not launching - AttributeError: module 'time' has no attribute 'clock' AttributeError:模块“时间”在 SQLAlchemy python 3.8.2 中没有属性“时钟” - AttributeError: module 'time' has no attribute 'clock' In SQLAlchemy python 3.8.2 属性错误模块“时间”没有属性“时钟”(pyqt5) - attributeerror module 'time' has no attribute 'clock' (pyqt5) Google API:AttributeError:模块“时间”没有属性“时钟” - Google API : AttributeError: module 'time' has no attribute 'clock' Flask(flask db init):AttributeError:模块“时间”没有属性“时钟” - Flask(flask db init): AttributeError: module 'time' has no attribute 'clock' AttributeError:模块“时间”在 MLFlow UI 中没有属性“时钟” - AttributeError: module 'time' has no attribute 'clock' in MLFlow UI
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM