提问人:Ihab Khelifa 提问时间:11/17/2023 最后编辑:Ihab Khelifa 更新时间:11/17/2023 访问量:57
PyQt5 工具错误准备元数据 (pyproject.toml) 未成功运行
PyQt5 tools error Preparing metadata (pyproject.toml) did not run successfully
问:
使用 pip commad 安装 pyqt5 后安装 pyqt5 工具时,出现此错误 我已经使用“pip install pygt5”安装了pyqt5
Defaulting to user installation because normal site-packages is not writeable
DEPRECATION: Loading egg at c:\program files\python312\lib\site-packages\vboxapi-1.0-py3.12.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at https://github.com/pypa/pip/issues/12330
Collecting pyqt5-tools
Using cached pyqt5_tools-5.15.9.3.3-py3-none-any.whl (29 kB)
Collecting click (from pyqt5-tools)
Using cached click-8.1.7-py3-none-any.whl.metadata (3.0 kB)
Collecting pyqt5==5.15.9 (from pyqt5-tools)
Using cached PyQt5-5.15.9-cp37-abi3-win_amd64.whl (6.8 MB)
INFO: pip is looking at multiple versions of pyqt5-tools to determine which version is compatible with other requirements. This could take a while.
Collecting pyqt5-tools
Using cached pyqt5_tools-5.15.4.3.2-py3-none-any.whl (29 kB)
Collecting pyqt5==5.15.4 (from pyqt5-tools)
Using cached PyQt5-5.15.4.tar.gz (3.3 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [25 lines of output]
Traceback (most recent call last):
File "C:\Users\ihabk\AppData\Roaming\Python\Python312\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "C:\Users\ihabk\AppData\Roaming\Python\Python312\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ihabk\AppData\Roaming\Python\Python312\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 "C:\Users\ihabk\AppData\Local\Temp\pip-build-env-yl4i5kg6\overlay\Lib\site-packages\sipbuild\api.py", line 46, in build_wheel
project = AbstractProject.bootstrap('wheel',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ihabk\AppData\Local\Temp\pip-build-env-yl4i5kg6\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 87, in bootstrap
project.setup(pyproject, tool, tool_description)
File "C:\Users\ihabk\AppData\Local\Temp\pip-build-env-yl4i5kg6\overlay\Lib\site-packages\sipbuild\project.py", line 586, in setup
self.apply_user_defaults(tool)
File "C:\Users\ihabk\AppData\Local\Temp\pip-install-yi_tz1v2\pyqt5_ed929b1887ec44d3ab4ffb88ed4a6082\project.py", line 63, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\ihabk\AppData\Local\Temp\pip-build-env-yl4i5kg6\overlay\Lib\site-packages\pyqtbuild\project.py", line 70, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\ihabk\AppData\Local\Temp\pip-build-env-yl4i5kg6\overlay\Lib\site-packages\sipbuild\project.py", line 237, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "C:\Users\ihabk\AppData\Local\Temp\pip-build-env-yl4i5kg6\overlay\Lib\site-packages\pyqtbuild\builder.py", line 69, in apply_user_defaults
raise PyProjectOptionException('qmake',
sipbuild.pyproject.PyProjectOptionException
[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.
我看到一些解决方案建议将 Python 版本降级到 3.9 最新 Python 版本 (3.12)
的任何解决方案
答: 暂无答案
评论