|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
python版本:3.12.1
报错:
- 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 "C:\Users\椋\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
- main()
- File "C:\Users\椋\AppData\Local\Programs\Python\Python312\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 "C:\Users\椋\AppData\Local\Programs\Python\Python312\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\椋\AppData\Local\Temp\pip-build-env-y5wece62\overlay\Lib\site-packages\sipbuild\api.py", line 46, in build_wheel
- project = AbstractProject.bootstrap('wheel',
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- File "C:\Users\椋\AppData\Local\Temp\pip-build-env-y5wece62\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 92, in bootstrap
- project.setup(pyproject, tool, tool_description)
- File "C:\Users\椋\AppData\Local\Temp\pip-build-env-y5wece62\overlay\Lib\site-packages\sipbuild\project.py", line 587, in setup
- self.apply_user_defaults(tool)
- File "C:\Users\椋\AppData\Local\Temp\pip-install-i_x12_wj\pyqt5_bbbccbd6d26547058afde11053301a64\project.py", line 63, in apply_user_defaults
- super().apply_user_defaults(tool)
- File "C:\Users\椋\AppData\Local\Temp\pip-build-env-y5wece62\overlay\Lib\site-packages\pyqtbuild\project.py", line 70, in apply_user_defaults
- super().apply_user_defaults(tool)
- File "C:\Users\椋\AppData\Local\Temp\pip-build-env-y5wece62\overlay\Lib\site-packages\sipbuild\project.py", line 237, in apply_user_defaults
- self.builder.apply_user_defaults(tool)
- File "C:\Users\椋\AppData\Local\Temp\pip-build-env-y5wece62\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.
- C:\Users\椋>pip install pyqt5-tools
- Looking in indexes: https://mirrors.aliyun.com/pypi/simple
- Collecting pyqt5-tools
- Using cached https://mirrors.aliyun.com/pypi/packages/11/7e/3a5bce0e31650e091a16826d7a588be8bd56c2ac30871286b6c90d68ceeb/pyqt5_tools-5.15.9.3.3-py3-none-any.whl (29 kB)
- Requirement already satisfied: click in c:\users\椋\appdata\local\programs\python\python312\lib\site-packages (from pyqt5-tools) (8.1.7)
- Collecting pyqt5==5.15.9 (from pyqt5-tools)
- Using cached https://mirrors.aliyun.com/pypi/packages/55/5d/8df8a2aa0de6588965d048fca9306cf15a5801be3078f195e8f8f41fa863/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 https://mirrors.aliyun.com/pypi/packages/b7/70/a25aab849a5e38ae78716acde1f917a14d9d819c8600bbb8cf536781f7c5/pyqt5_tools-5.15.4.3.2-py3-none-any.whl (29 kB)
- Collecting pyqt5==5.15.4 (from pyqt5-tools)
- Using cached https://mirrors.aliyun.com/pypi/packages/8e/a4/d5e4bf99dd50134c88b95e926d7b81aad2473b47fde5e3e4eac2c69a8942/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
- ╰─> [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 "C:\Users\椋\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
- main()
- File "C:\Users\椋\AppData\Local\Programs\Python\Python312\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 "C:\Users\椋\AppData\Local\Programs\Python\Python312\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\椋\AppData\Local\Temp\pip-build-env-y43zs7mk\overlay\Lib\site-packages\sipbuild\api.py", line 46, in build_wheel
- project = AbstractProject.bootstrap('wheel',
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- File "C:\Users\椋\AppData\Local\Temp\pip-build-env-y43zs7mk\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 92, in bootstrap
- project.setup(pyproject, tool, tool_description)
- File "C:\Users\椋\AppData\Local\Temp\pip-build-env-y43zs7mk\overlay\Lib\site-packages\sipbuild\project.py", line 587, in setup
- self.apply_user_defaults(tool)
- File "C:\Users\椋\AppData\Local\Temp\pip-install-ipb81zrx\pyqt5_6e1e53f3029f4a5f91a95c833cbcad91\project.py", line 63, in apply_user_defaults
- super().apply_user_defaults(tool)
- File "C:\Users\椋\AppData\Local\Temp\pip-build-env-y43zs7mk\overlay\Lib\site-packages\pyqtbuild\project.py", line 70, in apply_user_defaults
- super().apply_user_defaults(tool)
- File "C:\Users\椋\AppData\Local\Temp\pip-build-env-y43zs7mk\overlay\Lib\site-packages\sipbuild\project.py", line 237, in apply_user_defaults
- self.builder.apply_user_defaults(tool)
- File "C:\Users\椋\AppData\Local\Temp\pip-build-env-y43zs7mk\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.
复制代码
从错误信息来看,您似乎遇到了一个关于`pyqt5-tools`安装的问题。根据您提供的信息,有几个可能的原因导致安装失败:
1. Python版本不兼容:您使用的Python版本是3.12.1,而`pyqt5-tools`的兼容版本可能是3.6或3.7。请尝试使用与Python版本兼容的`pyqt5-tools`版本进行安装。
2. 网络问题:有时候由于网络原因,下载或安装过程可能会中断或失败。您可以尝试使用其他网络连接,或者使用国内的镜像源以提高下载速度和稳定性。
3. 依赖关系问题:`pyqt5-tools`可能有一些依赖关系,如果这些依赖关系没有正确安装,可能会导致安装失败。您可以尝试手动安装这些依赖关系,然后再次尝试安装`pyqt5-tools`。
以下是可行的解决方案:
1. 首先,确认您使用的Python版本是否与`pyqt5-tools`兼容。如果不兼容,请将Python版本更改为3.6或3.7,并重新尝试安装。
2. 检查并确保您的网络连接正常。您可以尝试使用其他网络连接,或者使用国内的镜像源来加快下载速度。
3. 在命令提示符中运行以下命令来手动安装`pyqt5-tools`的依赖关系:
- pip install pyqt5==5.15.9
复制代码
然后再次尝试安装`pyqt5-tools`:
如果上述解决方案都没有解决问题,您可以尝试在Python虚拟环境中安装`pyqt5-tools`,或者尝试使用其他方法或工具进行安装,如使用Anaconda等。
以上回复来自 FishC AI 小助理,如未能正确解答您的问题,请继续追问。
|
|