当前位置:首页 > Python >

Python安装pyqt5-tools失败

发布时间:2024-03-06 09:20:17 作者:佚名 阅读:(24)

最近在学习python时,安装pyqt5-tools插件一直提示失败查找了很多网友介绍的方法还是没有解决,接下来云梦编程就为大家介绍一下python3.12安装pyqt5-tools失败处理方法有需要的小伙伴可以参考一下:

Python安装pyqt5-tools失败

1、错误提示:

Python安装pyqt5-tools失败

详细错误内容如下:

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
  ╰─> [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):
        File "E:\Python\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "E:\Python\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "E:\Python\venv\Lib\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\lenovo\AppData\Local\Temp\pip-build-env-9kw63mdv\overlay\Lib\site-packages\sipbuild\api.py", line 46, in build_wheel
          project = AbstractProject.bootstrap('wheel',
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\lenovo\AppData\Local\Temp\pip-build-env-9kw63mdv\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 92, in bootstrap
          project.setup(pyproject, tool, tool_description)
        File "C:\Users\lenovo\AppData\Local\Temp\pip-build-env-9kw63mdv\overlay\Lib\site-packages\sipbuild\project.py", line 587, in setup
          self.apply_user_defaults(tool)
        File "C:\Users\lenovo\AppData\Local\Temp\pip-install-893e8p97\pyqt5_0bc8f7f9cbc9489587a106272c085f21\project.py", line 63, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "C:\Users\lenovo\AppData\Local\Temp\pip-build-env-9kw63mdv\overlay\Lib\site-packages\pyqtbuild\project.py", line 70, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "C:\Users\lenovo\AppData\Local\Temp\pip-build-env-9kw63mdv\overlay\Lib\site-packages\sipbuild\project.py", line 237, in apply_user_defaults
          self.builder.apply_user_defaults(tool)
        File "C:\Users\lenovo\AppData\Local\Temp\pip-build-env-9kw63mdv\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.

2、错误原因:

经过各种排查发现是因为安装的Python的版本太高了,和pyqt5-tools的版本不兼容,具体的可以在官网https://pypi.org/project/pyqt5-tools/#description看到pyqt5-tools最高支持的版本

Python安装pyqt5-tools失败

3、解决方法:

安装对应版本的Python,也就是针对现有的python进行降级处理。并添加到Pycharm中解释器中,再去按步骤安装pyqt5-tools插件即可

Python安装pyqt5-tools失败


以上就是云梦编程为大家介绍的关于python3.12安装pyqt5-tools失败解决放的全部内容了,了解更多相关文章请关注云梦编程网!

© 2023 - 云梦编程网 版权所有 鲁ICP备2021017318号-4