PIP安装PYQT6-TOOLS错误:元数据生成失效

发布于 2025-01-21 20:59:10 字数 2778 浏览 2 评论 0原文

安装构建依赖关系...完成 获得建造车轮的要求...完成 准备元数据(pyproject.toml)...错误 错误:子进程 - eRror

×准备元数据(pyproject.toml)未成功运行。 │退出代码:1 ╰ - > [29行输出线] Trackback(最近的最新电话): 文件“ C:\ USER \用户名\ AppData \ Local \ Program \ Python \ Python \ Python310 \ lib \ lib \ site-packages \ pip_vendor \ pep_vendor \ pep517 \ in_process_in_in_process.py” 钩=后端。prepare_metadata_for_build_wheel attributeError:模块“ sipbuild.api”没有属性'preparibute_metadata_for_build_wheel'

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "C:\Users\UserName\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
      main()
    File "C:\Users\UserName\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "C:\Users\UserName\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 160, in prepare_metadata_for_build_wheel
      whl_basename = backend.build_wheel(metadata_directory, config_settings)
    File "C:\Users\UserName\AppData\Local\Temp\pip-build-env-gztkrk3w\overlay\Lib\site-packages\sipbuild\api.py", line 51, in build_wheel
      project = AbstractProject.bootstrap('pep517')
    File "C:\Users\UserName\AppData\Local\Temp\pip-build-env-gztkrk3w\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 83, in bootstrap
      project.setup(pyproject, tool, tool_description)
    File "C:\Users\UserName\AppData\Local\Temp\pip-build-env-gztkrk3w\overlay\Lib\site-packages\sipbuild\project.py", line 594, in setup
      self.apply_user_defaults(tool)
    File "C:\Users\UserName\AppData\Local\Temp\pip-install-1ffm1q1f\pyqt6_3ccd59735b9b45e28a7c132c11063337\project.py", line 61, in apply_user_defaults
      super().apply_user_defaults(tool)
    File "C:\Users\UserName\AppData\Local\Temp\pip-build-env-gztkrk3w\overlay\Lib\site-packages\pyqtbuild\project.py", line 70, in apply_user_defaults
      super().apply_user_defaults(tool)
    File "C:\Users\UserName\AppData\Local\Temp\pip-build-env-gztkrk3w\overlay\Lib\site-packages\sipbuild\project.py", line 241, in apply_user_defaults
      self.builder.apply_user_defaults(tool)
    File "C:\Users\UserName\AppData\Local\Temp\pip-build-env-gztkrk3w\overlay\Lib\site-packages\pyqtbuild\builder.py", line 67, in apply_user_defaults
      raise PyProjectOptionException('qmake',
  sipbuild.pyproject.PyProjectOptionException
  [end of output]

注意:此错误源自子过程,可能对PIP没有问题。 元数据生成失败

错误:生成软件包元数据时, ×遇到错误。 ╰ - &gt;有关输出,请参见上文。

注意:这是上面提到的软件包的问题,​​而不是PIP。 提示:有关详细信息,请参见上文。 这是PIP向我显示的错误

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
╰─> [29 lines of output]
Traceback (most recent call last):
File "C:\Users\UserName\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 156, in prepare_metadata_for_build_wheel
hook = backend.prepare_metadata_for_build_wheel
AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "C:\Users\UserName\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
      main()
    File "C:\Users\UserName\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "C:\Users\UserName\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 160, in prepare_metadata_for_build_wheel
      whl_basename = backend.build_wheel(metadata_directory, config_settings)
    File "C:\Users\UserName\AppData\Local\Temp\pip-build-env-gztkrk3w\overlay\Lib\site-packages\sipbuild\api.py", line 51, in build_wheel
      project = AbstractProject.bootstrap('pep517')
    File "C:\Users\UserName\AppData\Local\Temp\pip-build-env-gztkrk3w\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 83, in bootstrap
      project.setup(pyproject, tool, tool_description)
    File "C:\Users\UserName\AppData\Local\Temp\pip-build-env-gztkrk3w\overlay\Lib\site-packages\sipbuild\project.py", line 594, in setup
      self.apply_user_defaults(tool)
    File "C:\Users\UserName\AppData\Local\Temp\pip-install-1ffm1q1f\pyqt6_3ccd59735b9b45e28a7c132c11063337\project.py", line 61, in apply_user_defaults
      super().apply_user_defaults(tool)
    File "C:\Users\UserName\AppData\Local\Temp\pip-build-env-gztkrk3w\overlay\Lib\site-packages\pyqtbuild\project.py", line 70, in apply_user_defaults
      super().apply_user_defaults(tool)
    File "C:\Users\UserName\AppData\Local\Temp\pip-build-env-gztkrk3w\overlay\Lib\site-packages\sipbuild\project.py", line 241, in apply_user_defaults
      self.builder.apply_user_defaults(tool)
    File "C:\Users\UserName\AppData\Local\Temp\pip-build-env-gztkrk3w\overlay\Lib\site-packages\pyqtbuild\builder.py", line 67, 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.
This is the error which pip shown to me

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

逐鹿 2025-01-28 20:59:10

(我正在使用Windows 10 Enterprise 20H2,并且我安装了Python 3.9.7)

安装QT6如下:

open 命令提示作为管理员并执行以下操作:

  1. pip pip install pyqt6
  2. <代码> PIP安装Pyqt6-tools

- 现在,在Windows搜索栏中,输入“ 查看Advance System Sectings ”,然后在升起时选择该选项。这将带有已经选择的高级选项卡的系统属性窗口。

- 单击右下方附近的“环境变量...”以拉起环境变量窗口。在称为系统变量的底部,双击“路径”。

- 在新打开的窗口中,单击“ new”,然后输入c:\ Program Files \ Python39 \ lib \ site-packages \ qt6_applications \ qt \ qt \ bin作为路径。

现在,您可以通过键入Designer从命令行和搜索栏执行QT6设计器。瞧。

(I'm using Windows 10 Enterprise 20H2 and I installed Python 3.9.7)

Install QT6 as follows:

Open Command Prompt as Administrator and execute the following:

  1. pip install pyqt6
  2. pip install pyqt6-tools

-- Now, in the Windows search bar, type in "View advance system settings" and select that option when it pulls up. This will bring up the System Properties window with the Advanced tab already selected.

-- Click on "Environment Variables..." near the bottom right to pull up the Environment Variables window. In the bottom section called System variables, double-click on "Path".

--In the newly opened window, click on "New" and enter in C:\Program Files\Python39\Lib\site-packages\qt6_applications\Qt\bin as a path.

Now, you can execute QT6 Designer from the command line and from the search bar just by typing designer. Voilà.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文