pip install pyqt5-tools失败

pip install pyqt5-tools失败

Installing collected packages: PyQt5-Qt5, PyQt5-sip, pyqt5
Successfully installed PyQt5-Qt5-5.15.11 PyQt5-sip-12.13.0 pyqt5-5.15.10
(cv) wjunicorn@liuwenjundeMacBook-Pro ~ % pip install pyqt5-tools
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting pyqt5-tools
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/11/7e/3a5bce0e31650e091a16826d7a588be8bd56c2ac30871286b6c90d68ceeb/pyqt5_tools-5.15.9.3.3-py3-none-any.whl (29 kB)
Collecting click (from pyqt5-tools)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl (97 kB)
Collecting pyqt5==5.15.9 (from pyqt5-tools)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/5c/46/b4b6eae1e24d9432905ef1d4e7c28b6610e28252527cdc38f2a75997d8b5/PyQt5-5.15.9.tar.gz (3.2 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
  ╰─> [23 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 "/Users/wjunicorn/anaconda3/envs/cv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/wjunicorn/anaconda3/envs/cv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Users/wjunicorn/anaconda3/envs/cv/lib/python3.10/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 "/private/var/folders/w6/6frsx7bn5jx_v1bh6mznx3ch0000gn/T/pip-build-env-9bn1u15c/overlay/lib/python3.10/site-packages/sipbuild/api.py", line 46, in build_wheel
          project = AbstractProject.bootstrap('wheel',
        File "/private/var/folders/w6/6frsx7bn5jx_v1bh6mznx3ch0000gn/T/pip-build-env-9bn1u15c/overlay/lib/python3.10/site-packages/sipbuild/abstract_project.py", line 87, in bootstrap
          project.setup(pyproject, tool, tool_description)
        File "/private/var/folders/w6/6frsx7bn5jx_v1bh6mznx3ch0000gn/T/pip-build-env-9bn1u15c/overlay/lib/python3.10/site-packages/sipbuild/project.py", line 587, in setup
          self.apply_user_defaults(tool)
        File "/private/var/folders/w6/6frsx7bn5jx_v1bh6mznx3ch0000gn/T/pip-install-nvt1t_af/pyqt5_533b390e19cc4b0bafca76fe1146a91e/project.py", line 68, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "/private/var/folders/w6/6frsx7bn5jx_v1bh6mznx3ch0000gn/T/pip-build-env-9bn1u15c/overlay/lib/python3.10/site-packages/pyqtbuild/project.py", line 70, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "/private/var/folders/w6/6frsx7bn5jx_v1bh6mznx3ch0000gn/T/pip-build-env-9bn1u15c/overlay/lib/python3.10/site-packages/sipbuild/project.py", line 237, in apply_user_defaults
          self.builder.apply_user_defaults(tool)
        File "/private/var/folders/w6/6frsx7bn5jx_v1bh6mznx3ch0000gn/T/pip-build-env-9bn1u15c/overlay/lib/python3.10/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.
(cv) wjunicorn@liuwenjundeMacBook-Pro ~ %


正在回答 回答被采纳积分+1

登陆购买课程后可参与讨论,去登陆

2回答
Leo健恒 2023-12-19 19:37:30
抱歉,我没有mac电脑,调试不了,不过我网上找到了一个解决方案,您可以参考一下,如下:https://blog.csdn.net/weixin_44649870/article/details/117961332
Victory_Liu 提问者 2023-12-14 17:17:30

电脑是mac m2

pyqt5-tools安装不了,采用

cv环境使用的是python3.11

pip install pyqt6

pip install pyside6

在pycharm ce中配置成功

【Qt Designer】

- 程序:/Users/wjunicorn/anaconda3/envs/cv/lib/python3.11/site-packages/PySide6/Designer.app/Contents/MacOS/Designer

- 工作目录:$ProjectFileDir$

【pyuic】

- 程序:/Users/wjunicorn/anaconda3/envs/cv/bin/python3.11

- 实参:-m PyQt6.uic.pyuic -o $FileNameWithoutExtension$.py $FileName$

- 工作目录:$FileDir$


  • 通过这种方法 菜单还是无法显示

    2024-01-08 18:12:53
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
AI人工智能算法工程师
  • 参与学习       447    人
  • 解答问题       130    个

从AI零基础入门,打通视觉,NLP,机器&深度学习,推荐搜索,AIGC,大模型 引领行业知识体系+工业级多领域综合项目+资深专业讲师团+全方位贴心服务 助力你快速成为新时代抢手人才,多领域灵活就业

了解课程
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师