python3.7的time库中perf_counter()报错问题解决策略

运行过程中发出现错误“AttributeError: ‘module’ object has no attribute ‘perf_counter’”。 看了很多帖子后,尝试了多种方法后发现在terminal中输入python后会直接进入python2.7版本,因此电脑中有两个版本的python存在,2.7和3.7版本。默认情况之下运行2.7版本。如果在代码首行声明是#!/usr/bin/pyth
相关文章
相关标签/搜索