从tobii_research导入HMDLensConfiguration给出错误ImportError:无法导入名称HMDLensConfiguration

时间:2019-09-19 12:02:50

标签: python-2.7 eye-tracking

我已经在Windows 10系统上的Python 2.7上使用pip安装了Tobii Pro SDK。我正在使用Tobii网站上提供的get_hmd_lens_configuration.py脚本(可在http://devtobiipro.azurewebsites.net/tobii.research/python/reference/1.7.0.8-alpha-g6c0fdf3/hmd_calibration_8py-example.html上找到该脚本)只是为了了解其工作原理。但是,执行脚本时出现错误“导入错误:无法导入名称HMDLensConfiguration”。

import tobii_research as tr

found_eyetrackers = tr.find_all_eyetrackers()    
my_eyetracker = found_eyetrackers[0]
from tobii_research import HMDLensConfiguration
lens_configuration = my_eyetracker.get_hmd_lens_configuration()

print("Got HMD lens configuration from tracker with serial number {0}:".format(my_eyetracker.serial_number))
print("Left: {0}".format(lens_configuration.left))
print("Right: {0}".format(lens_configuration.right))

from tobii_research import HMDLensConfiguration
ImportError: cannot import name HMDLensConfiguration

0 个答案:

没有答案