美文网首页
python3.8 版本 ImportError: cannot

python3.8 版本 ImportError: cannot

作者: 觉释 | 来源:发表于2021-07-14 15:45 被阅读0次
问题:

odoo14 python3.8 提示ImportError: cannot import name ‘clock’ from ‘time’ (unknown location),

解决方案 :

原因是3.8已经放弃time的clock。解决方案:找到对应源文件,该里面的内容将time中的clock用process_time来替代

from time import clock as timer 改为
from time import process_time as timer

相关文章

网友评论

      本文标题:python3.8 版本 ImportError: cannot

      本文链接:https://www.haomeiwen.com/subject/smmypltx.html