Never Mind the Scandal and Libel
白洞

安装PyQt6成功,安装PyQt6tools报错

解决方案:

先用python3.11的插件包进行安装,有了环境,就可以正常安装pyqt6-tools了。

pyqt6的插件下载地址:https://pypi.org/project/pyqt6-plugins/#files

下载后的文件名为:pyqt6_plugins-6.4.2.2.3-cp311-cp311-win_amd64.whl

把文件拖到WinRAR解压缩文件中打开,找到“pyqt6_plugins-6.4.2.2.3.dist-info”文件夹下的“METADATA”文件,把“METADATA”文件移出压缩包,用记事本打开进行修改。

删除(==6.4.2),
然后保存,
拖进原来的压缩包,替换之前的“METADATA”文件。

更改压缩包名称为:pyqt6_plugins-6.4.2.2.3-py3-none-any.whl,

把压缩包放进PyQt6的安装路径中(\Python312\Lib\site-packages\PyQt6),

在该路径上打开终端进行pip install进行安装,可以在尾部加上清华的镜像,提高下载速度。

加上清华源的pip安装命令为:

pip install C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyQt6\pyqt6_plugins-6.4.2.2.3-py3-none-any.whl -i https://pypi.tuna.tsinghua.edu.cn/simple/

安装成功以后再安装pyqt6-tools就可以成功安装了

pip install pyqt6-tools -i https://pypi.tuna.tsinghua.edu.cn/simple/

2024年05月28日