中国 · 南京 · 栖霞区紫东路2号紫东国际创意园B3-2幢5F
+86-18994094214 (仅工作日:8:30~17:30)
contact@oakchina.cn

【43】ImportError: cannot import name ‘FPSHandler‘ from ‘depthai_sdk‘

View Categories

【43】ImportError: cannot import name ‘FPSHandler‘ from ‘depthai_sdk‘

< 1 min read

报错提示:

OAK相机环境安装完后,使用pycharm运行yolox.py文件;报错ImportError: cannot import name ‘FPSHandler’ from ‘depthai_sdk’ (D:\Anaconda\envs\second_py\lib\site-packages\depthai_sdk_init_.py)

解决方法:

可以将
from depthai_sdk import FPSHandler, toTensorResult, getDeviceInfo
改成
from depthai_sdk.fps import FPSHandler
from depthai_sdk.utils import toTensorResult, getDeviceInfo

或者 将 depthai_sdk 降级

pip install "depthai_sdk<=1.9"