【发布时间】:2020-07-10 14:20:48
【问题描述】:
我了解time.clock() 自 Python 3.3 以来已被弃用。
但是,当我尝试导入 pyqtgraph 模块时发生错误:
import pyqtgraph
这是文件中唯一的一行,这是错误:
File "D:\2020Backup\2020Backup\code\Python\PyQt\graphs\first.py", line 1, in <module>
import pyqtgraph
File "C:\Users\mpnlo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyqtgraph\__init__.py", line 204, in <module>
from .graphicsItems.VTickGroup import *
File "C:\Users\mpnlo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyqtgraph\graphicsItems\VTickGroup.py", line 7, in <module>
from .. import functions as fn
File "C:\Users\mpnlo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyqtgraph\functions.py", line 17, in <module>
from . import debug
File "C:\Users\mpnlo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyqtgraph\debug.py", line 11, in <module>
from . import ptime
File "C:\Users\mpnlo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyqtgraph\ptime.py", line 24, in <module>
cstart = systime.clock() ### Required to start the clock in windows
AttributeError: module 'time' has no attribute 'clock'
我想知道是否有人知道这个问题的解决方法,也许是我更新模块中错误的一种方法,我正在使用最新版本的 pyqtgraph。
【问题讨论】:
标签: python pyqt pyqt5 pyqtgraph