当前位置: 首页 > 工具软件 > APITools-HTTP > 使用案例 >

PyQt5-tools 安装失败 (python 3.11/python 3.10)

何嘉运
2023-12-01

命令:

pip install PyQt5-5.15.4-py3-none-win_amd64.whl
pip install pyqt5_plugins-5.15.4.2.2-py3-none-win_amd64.whl
pip install pyqt5-tools

下载上述命令的两个文件

https://download.csdn.net/download/weixin_43064845/87300972

原始安装错误提示:

C:\Users\linuslau>pip install PyQt5-tools
Collecting PyQt5-tools
  Using cached pyqt5_tools-5.15.4.3.2-py3-none-any.whl (29 kB)
  Using cached pyqt5_tools-5.15.4.3.1-py3-none-any.whl (28 kB)
Collecting click
  Using cached click-8.0.4-py3-none-any.whl (97 kB)
Collecting PyQt5-tools
  Using cached pyqt5_tools-5.15.4.3.0.3-py3-none-any.whl (28 kB)
  Using cached pyqt5_tools-5.15.3.3.2-py3-none-any.whl (29 kB)
Collecting python-dotenv
  Using cached python_dotenv-0.19.2-py2.py3-none-any.whl (17 kB)
Collecting PyQt5-tools
  Using cached pyqt5_tools-5.15.3.3.1-py3-none-any.whl (28 kB)
  Using cached pyqt5_tools-5.15.3.3.0.3-py3-none-any.whl (28 kB)
  Using cached pyqt5_tools-5.15.2.3.2-py3-none-any.whl (29 kB)
Collecting pyqt5==5.15.2
  Using cached PyQt5-5.15.2.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
  ╰─> [29 lines of output]
      Traceback (most recent call last):
        File "C:\Users\linuslau\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\linuslau\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
          main()
        File "C:\Users\linuslau\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\linuslau\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\linuslau\AppData\Local\Temp\pip-build-env-6lzd4wik\overlay\Lib\site-packages\sipbuild\api.py", line 51, in build_wheel
          project = AbstractProject.bootstrap('pep517')
        File "C:\Users\linuslau\AppData\Local\Temp\pip-build-env-6lzd4wik\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 83, in bootstrap
          project.setup(pyproject, tool, tool_description)
        File "C:\Users\linuslau\AppData\Local\Temp\pip-build-env-6lzd4wik\overlay\Lib\site-packages\sipbuild\project.py", line 594, in setup
          self.apply_user_defaults(tool)
        File "C:\Users\linuslau\AppData\Local\Temp\pip-install-lmck1ydb\pyqt5_d337c407e37e43469adb9b9b0124b1fd\project.py", line 63, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "C:\Users\linuslau\AppData\Local\Temp\pip-build-env-6lzd4wik\overlay\Lib\site-packages\pyqtbuild\project.py", line 70, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "C:\Users\linuslau\AppData\Local\Temp\pip-build-env-6lzd4wik\overlay\Lib\site-packages\sipbuild\project.py", line 241, in apply_user_defaults
          self.builder.apply_user_defaults(tool)
        File "C:\Users\linuslau\AppData\Local\Temp\pip-build-env-6lzd4wik\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

本机成功结果:

Microsoft Windows [Version 10.0.22000.1335]
(c) Microsoft Corporation. All rights reserved.

c:\Users\linuslau\Downloads\PyQt5-tools-renamed-packages>pip install PyQt5-5.15.4-py3-none-win_amd64.whl
Processing c:\users\linuslau\downloads\pyqt5-tools-renamed-packages\pyqt5-5.15.4-py3-none-win_amd64.whl
Requirement already satisfied: PyQt5-sip<13,>=12.8 in c:\users\linuslau\appdata\roaming\python\python311\site-packages (from PyQt5==5.15.4) (12.11.0)
Requirement already satisfied: PyQt5-Qt5>=5.15 in c:\users\linuslau\appdata\roaming\python\python311\site-packages (from PyQt5==5.15.4) (5.15.2)
Installing collected packages: PyQt5
  Attempting uninstall: PyQt5
    Found existing installation: PyQt5 5.15.7
    Uninstalling PyQt5-5.15.7:
      Successfully uninstalled PyQt5-5.15.7
Successfully installed PyQt5-5.15.4

c:\Users\linuslau\Downloads\PyQt5-tools-renamed-packages>pip install pyqt5_plugins-5.15.4.2.2-py3-none-win_amd64.whl
Processing c:\users\linuslau\downloads\pyqt5-tools-renamed-packages\pyqt5_plugins-5.15.4.2.2-py3-none-win_amd64.whl
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x0000019D004E6350>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/click/
ERROR: Operation cancelled by user

c:\Users\linuslau\Downloads\PyQt5-tools-renamed-packages>

c:\Users\linuslau\Downloads\PyQt5-tools-renamed-packages>
c:\Users\linuslau\Downloads\PyQt5-tools-renamed-packages>
c:\Users\linuslau\Downloads\PyQt5-tools-renamed-packages>sp

c:\Users\linuslau\Downloads\PyQt5-tools-renamed-packages>set http_proxy=http://child-prc.intel.com:913

c:\Users\linuslau\Downloads\PyQt5-tools-renamed-packages>set https_proxy=http://child-prc.intel.com:913

c:\Users\linuslau\Downloads\PyQt5-tools-renamed-packages>pip install pyqt5_plugins-5.15.4.2.2-py3-none-win_amd64.whl
Processing c:\users\linuslau\downloads\pyqt5-tools-renamed-packages\pyqt5_plugins-5.15.4.2.2-py3-none-win_amd64.whl
Collecting click
  Using cached click-8.1.3-py3-none-any.whl (96 kB)
Requirement already satisfied: pyqt5==5.15.4 in c:\program files\python311\lib\site-packages (from pyqt5-plugins==5.15.4.2.2) (5.15.4)
Collecting qt5-tools<5.15.2.2,>=5.15.2.1.2
  Downloading qt5_tools-5.15.2.1.2-py3-none-any.whl (13 kB)
Requirement already satisfied: PyQt5-sip<13,>=12.8 in c:\users\linuslau\appdata\roaming\python\python311\site-packages (from pyqt5==5.15.4->pyqt5-plugins==5.15.4.2.2) (12.11.0)
Requirement already satisfied: PyQt5-Qt5>=5.15 in c:\users\linuslau\appdata\roaming\python\python311\site-packages (from pyqt5==5.15.4->pyqt5-plugins==5.15.4.2.2) (5.15.2)
Collecting qt5-applications<5.15.2.3,>=5.15.2.2.2
  Downloading qt5_applications-5.15.2.2.2-py3-none-win_amd64.whl (60.9 MB)
     ---------------------------------------- 60.9/60.9 MB 12.3 MB/s eta 0:00:00
Collecting click
  Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
     ---------------------------------------- 82.8/82.8 kB 4.8 MB/s eta 0:00:00
Installing collected packages: qt5-applications, click, qt5-tools, pyqt5-plugins
Successfully installed click-7.1.2 pyqt5-plugins-5.15.4.2.2 qt5-applications-5.15.2.2.2 qt5-tools-5.15.2.1.2

c:\Users\linuslau\Downloads\PyQt5-tools-renamed-packages>pip install pyqt5-tools
Collecting pyqt5-tools
  Using cached pyqt5_tools-5.15.4.3.2-py3-none-any.whl (29 kB)
Requirement already satisfied: click in c:\program files\python311\lib\site-packages (from pyqt5-tools) (7.1.2)
Requirement already satisfied: pyqt5==5.15.4 in c:\program files\python311\lib\site-packages (from pyqt5-tools) (5.15.4)
Requirement already satisfied: pyqt5-plugins<5.15.4.3,>=5.15.4.2.2 in c:\program files\python311\lib\site-packages (from pyqt5-tools) (5.15.4.2.2)
Collecting python-dotenv
  Downloading python_dotenv-0.21.0-py3-none-any.whl (18 kB)
Requirement already satisfied: PyQt5-sip<13,>=12.8 in c:\users\linuslau\appdata\roaming\python\python311\site-packages (from pyqt5==5.15.4->pyqt5-tools) (12.11.0)
Requirement already satisfied: PyQt5-Qt5>=5.15 in c:\users\linuslau\appdata\roaming\python\python311\site-packages (from pyqt5==5.15.4->pyqt5-tools) (5.15.2)
Requirement already satisfied: qt5-tools<5.15.2.2,>=5.15.2.1.2 in c:\program files\python311\lib\site-packages (from pyqt5-plugins<5.15.4.3,>=5.15.4.2.2->pyqt5-tools) (5.15.2.1.2)
Requirement already satisfied: qt5-applications<5.15.2.3,>=5.15.2.2.2 in c:\program files\python311\lib\site-packages (from qt5-tools<5.15.2.2,>=5.15.2.1.2->pyqt5-plugins<5.15.4.3,>=5.15.4.2.2->pyqt5-tools) (5.15.2.2.2)
Installing collected packages: python-dotenv, pyqt5-tools
Successfully installed pyqt5-tools-5.15.4.3.2 python-dotenv-0.21.0

c:\Users\linuslau\Downloads\PyQt5-tools-renamed-packages>

 类似资料: