当我尝试安装
PyQt6-tools
时,完整输出表明 PyQt6-tools 软件包可用,但依赖于 PyQt6-plugins
,它没有任何可用版本。这是错误
ERROR: Cannot install pyqt6-tools==6.0.1.3.2, pyqt6-tools==6.0.2.3.2, pyqt6-tools==6.0.3.3.2, pyqt6-tools==6.1.0.3.2, pyqt6-tools==6.3.1.3.3 and pyqt6-tools==6.4.2.3.3 because these package versions have conflicting dependencies.
The conflict is caused by:
pyqt6-tools 6.4.2.3.3 depends on pyqt6-plugins<6.4.2.3 and >=6.4.2.2.2
pyqt6-tools 6.3.1.3.3 depends on pyqt6-plugins<6.3.1.3 and >=6.3.1.2.2
pyqt6-tools 6.1.0.3.2 depends on pyqt6-plugins<6.1.0.3 and >=6.1.0.2.2
pyqt6-tools 6.0.3.3.2 depends on pyqt6-plugins<6.0.3.3 and >=6.0.3.2.2
pyqt6-tools 6.0.2.3.2 depends on pyqt6-plugins<6.0.2.3 and >=6.0.2.2.2
pyqt6-tools 6.0.1.3.2 depends on pyqt6-plugins<6.0.1.3 and >=6.0.1.2.2
然后我尝试单独安装
pyqt6-plugin
,但它仍然说连一个版本都没有
$ pip3 install pyqt6-plugins --break-system-packages
ERROR: Could not find a version that satisfies the requirement pyqt6-plugins (from versions: none)
ERROR: No matching distribution found for pyqt6-plugins
注意:我使用的是 Ubuntu 24.04 Noble、Python 3.12.3、pip 24.2
我在尝试安装其他软件包时意外发现了这种安装方式,而不是使用
apt
,并通过ubuntu自行完成了apt install pyqt6-dev-tools
,解决了问题并替换了pip install PyQt6-tools