起因是需要安装的扩展包对pyqt5的版本有要求,需要在5.15.4及以上,用阿里云等镜像显示找不到这个版本,pip使用清华源安装pyqt5==5.15.4时可以找到,但是一直报错:
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [26 lines of output]
pyproject.toml: line 7: using '[tool.sip.metadata]' to specify the project metadata is deprecated and will be removed in SIP v7.0.0, use '[project]' instead
Traceback (most recent call last):
[...中间省略一段...]
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
解决方法:换5.15.5/更高版本就可以顺利安装了,大概率是和已有包不兼容的问题或者安装包的问题