这个报错是因为 traitsui
需要一个合适的 UI 工具包(如 PyQt、PySide 或 wxPython)来运行,但当前环境中没有安装这些工具包。traitsui
是一个用于创建用户界面的库,它依赖于这些工具包来渲染界面
可以安装:pyqt,或pyside
pip install PyQt5
如果pyqt已安装依旧报错:
那么:
pip install PySide
如果安装pyside时报错,显示版本问题,我安装pyside时报错:
The following packages are incompatible
└─ pyside is not installable because there are no viable options
├─ pyside 1.2.4 would require
│ └─ qt 4.8* , which does not exist (perhaps a missing channel);
└─ pyside 1.2.4 would require
└─ qt 4.8.* , which does not exist (perhaps a missing channel).
那么重新安装pyside:
pip install PySide6
因为默认可能安装的该库版本较低