我只在我的Ubuntu22.04系统中成功用pip安装了PyQt6到conda虚拟环境中,在archlinux和windows的msys2中pip安装总是各种错误,并且我在各大论坛(例如github、stackoverflow以及本论坛)中都没有找到有效的解决方法。 目前我在archlinux上的conda环境中pip安装报错为:
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [21 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 Querying qmake about your Qt installation… Traceback (most recent call last): File “/tools/miniforge3/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 353, in main() File “/tools/miniforge3/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 335, in main json_out[‘return_val’] = hook(**hook_input[‘kwargs’]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/tools/miniforge3/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 152, in prepare_metadata_for_build_wheel whl_basename = backend.build_wheel(metadata_directory, config_settings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/tmp/pip-build-env-0h07rd5t/overlay/lib/python3.11/site-packages/sipbuild/api.py”, line 46, in build_wheel project = AbstractProject.bootstrap(‘wheel’, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/tmp/pip-build-env-0h07rd5t/overlay/lib/python3.11/site-packages/sipbuild/abstract_project.py”, line 92, in bootstrap project.setup(pyproject, tool, tool_description) File “/tmp/pip-build-env-0h07rd5t/overlay/lib/python3.11/site-packages/sipbuild/project.py”, line 603, in setup self.update(tool) File “/tmp/pip-install-wqprpznv/pyqt6_4489c6f936a44d30ae8581499dda5f5b/project.py”, line 163, in update raise UserException( sipbuild.exceptions.UserException [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. Error: 1