无法安装 PyQT5,无论是在 Linux 还是 macOS 上

发布于 2025-01-11 01:16:06 字数 18310 浏览 0 评论 0原文

作为课程的一部分,我们必须使用 PyQT5。但是,在 Ubuntu 20.24 或 macOS 12.1 中安装会出现以下错误。请注意,一切都是最新的,我已经做了我知道该怎么做的一切。类似问题的答案似乎没有产生任何结果。


ma​​cOS 12.1Python 3.10.2 / pip 22.0.3):

Collecting pyqt5
  Using cached PyQt5-5.15.6.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
  ╰─> [29 lines of output]
      Traceback (most recent call last):
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/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 "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/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 "/private/var/folders/j_/0h809bz57qgdkgx3299vt3jh0000gn/T/pip-build-env-0hz777qt/overlay/lib/python3.10/site-packages/sipbuild/api.py", line 51, in build_wheel
          project = AbstractProject.bootstrap('pep517')
        File "/private/var/folders/j_/0h809bz57qgdkgx3299vt3jh0000gn/T/pip-build-env-0hz777qt/overlay/lib/python3.10/site-packages/sipbuild/abstract_project.py", line 83, in bootstrap
          project.setup(pyproject, tool, tool_description)
        File "/private/var/folders/j_/0h809bz57qgdkgx3299vt3jh0000gn/T/pip-build-env-0hz777qt/overlay/lib/python3.10/site-packages/sipbuild/project.py", line 594, in setup
          self.apply_user_defaults(tool)
        File "/private/var/folders/j_/0h809bz57qgdkgx3299vt3jh0000gn/T/pip-install-652wocvg/pyqt5_8cb0d91c53bd4b9293156fad68e175f5/project.py", line 63, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "/private/var/folders/j_/0h809bz57qgdkgx3299vt3jh0000gn/T/pip-build-env-0hz777qt/overlay/lib/python3.10/site-packages/pyqtbuild/project.py", line 70, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "/private/var/folders/j_/0h809bz57qgdkgx3299vt3jh0000gn/T/pip-build-env-0hz777qt/overlay/lib/python3.10/site-packages/sipbuild/project.py", line 241, in apply_user_defaults
          self.builder.apply_user_defaults(tool)
        File "/private/var/folders/j_/0h809bz57qgdkgx3299vt3jh0000gn/T/pip-build-env-0hz777qt/overlay/lib/python3.10/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.

Ubuntu 20.24Python 3.10.2 / pip 20.0.3 ):

Defaulting to user installation because normal site-packages is not writeable
Collecting pyqt5
  Using cached PyQt5-5.15.6.tar.gz (3.2 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [134 lines of output]
      Collecting sip<7,>=6.4
        Using cached sip-6.5.1.tar.gz (1.2 MB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'done'
      Collecting PyQt-builder<2,>=1.9
        Using cached PyQt_builder-1.12.2-py3-none-any.whl (5.6 MB)
      Collecting setuptools
        Using cached setuptools-60.9.3-py3-none-any.whl (1.1 MB)
      Collecting packaging
        Using cached packaging-21.3-py3-none-any.whl (40 kB)
      Collecting toml
        Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
      Collecting pyparsing!=3.0.5,>=2.0.2
        Using cached pyparsing-3.0.7-py3-none-any.whl (98 kB)
      Building wheels for collected packages: sip
        Building wheel for sip (pyproject.toml): started
        Building wheel for sip (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error
      
        × Building wheel for sip (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [102 lines of output]
            running bdist_wheel
            running build
            running build_py
            creating build
            creating build/lib.linux-aarch64-3.10
            creating build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/bindings.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/installable.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/distutils_builder.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/pyproject.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/abstract_builder.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/py_versions.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/builder.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/configurable.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/__init__.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/api.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/argument_parser.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/abstract_project.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/project.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/buildable.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/version.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/helpers.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/setuptools_builder.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/exceptions.py -> build/lib.linux-aarch64-3.10/sipbuild
            creating build/lib.linux-aarch64-3.10/sipbuild/distinfo
            copying sipbuild/distinfo/distinfo.py -> build/lib.linux-aarch64-3.10/sipbuild/distinfo
            copying sipbuild/distinfo/__init__.py -> build/lib.linux-aarch64-3.10/sipbuild/distinfo
            copying sipbuild/distinfo/main.py -> build/lib.linux-aarch64-3.10/sipbuild/distinfo
            creating build/lib.linux-aarch64-3.10/sipbuild/tools
            copying sipbuild/tools/sdist.py -> build/lib.linux-aarch64-3.10/sipbuild/tools
            copying sipbuild/tools/build.py -> build/lib.linux-aarch64-3.10/sipbuild/tools
            copying sipbuild/tools/wheel.py -> build/lib.linux-aarch64-3.10/sipbuild/tools
            copying sipbuild/tools/__init__.py -> build/lib.linux-aarch64-3.10/sipbuild/tools
            copying sipbuild/tools/install.py -> build/lib.linux-aarch64-3.10/sipbuild/tools
            creating build/lib.linux-aarch64-3.10/sipbuild/module
            copying sipbuild/module/__init__.py -> build/lib.linux-aarch64-3.10/sipbuild/module
            copying sipbuild/module/main.py -> build/lib.linux-aarch64-3.10/sipbuild/module
            copying sipbuild/module/abi_version.py -> build/lib.linux-aarch64-3.10/sipbuild/module
            copying sipbuild/module/module.py -> build/lib.linux-aarch64-3.10/sipbuild/module
            creating build/lib.linux-aarch64-3.10/sipbuild/module/source
            creating build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/voidptr.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/sipint.h -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/sip.h.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/README.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/array.h -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/sip.rst.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/sip.pyi -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/LICENSE-GPL3 -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/LICENSE-GPL2 -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/MANIFEST.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/array.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/LICENSE -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/pyproject.toml -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/setup.cfg.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/bool.cpp -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/objmap.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/siplib.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/int_convertors.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/descriptors.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/setup.py.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/threads.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            creating build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/voidptr.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/sipint.h -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/sip.h.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/README.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/array.h -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/sip.rst.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/sip.pyi -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/LICENSE-GPL3 -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/LICENSE-GPL2 -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/MANIFEST.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/array.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/LICENSE -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/apiversions.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/pyproject.toml -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/qtlib.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/setup.cfg.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/bool.cpp -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/objmap.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/siplib.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/int_convertors.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/descriptors.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/setup.py.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/threads.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            running build_ext
            building 'sipbuild.code_generator' extension
            creating build/temp.linux-aarch64-3.10
            creating build/temp.linux-aarch64-3.10/code_generator
            aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.10 -I/usr/local/include/python3.10 -c code_generator/export.c -o build/temp.linux-aarch64-3.10/code_generator/export.o
            aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.10 -I/usr/local/include/python3.10 -c code_generator/extracts.c -o build/temp.linux-aarch64-3.10/code_generator/extracts.o
            aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.10 -I/usr/local/include/python3.10 -c code_generator/gencode.c -o build/temp.linux-aarch64-3.10/code_generator/gencode.o
            aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.10 -I/usr/local/include/python3.10 -c code_generator/heap.c -o build/temp.linux-aarch64-3.10/code_generator/heap.o
            aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.10 -I/usr/local/include/python3.10 -c code_generator/lexer.c -o build/temp.linux-aarch64-3.10/code_generator/lexer.o
            aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.10 -I/usr/local/include/python3.10 -c code_generator/parser.c -o build/temp.linux-aarch64-3.10/code_generator/parser.o
            aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.10 -I/usr/local/include/python3.10 -c code_generator/pybinding.c -o build/temp.linux-aarch64-3.10/code_generator/pybinding.o
            code_generator/pybinding.c:30:10: fatal error: Python.h: No such file or directory
               30 | #include <Python.h>
                  |          ^~~~~~~~~~
            compilation terminated.
            error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1
            [end of output]
      
        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for sip
      Failed to build sip
      ERROR: Could not build wheels for sip, which is required to install pyproject.toml-based projects
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Stack Overflow 拒绝让我发布包含如此多代码的内容,因此我将在最后添加一些内容。整个上下文已经存在,所以不应该添加任何内容,但我被迫这样做。

As part of a class, we have to use PyQT5. However, installing in both Ubuntu 20.24 or macOS 12.1 gives the following errors. Please note that everything is up to date, and I have done everything I knew how to do. The answers to similar questions do not seem to yield any results.


macOS 12.1 (Python 3.10.2 / pip 22.0.3) :

Collecting pyqt5
  Using cached PyQt5-5.15.6.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
  ╰─> [29 lines of output]
      Traceback (most recent call last):
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/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 "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/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 "/private/var/folders/j_/0h809bz57qgdkgx3299vt3jh0000gn/T/pip-build-env-0hz777qt/overlay/lib/python3.10/site-packages/sipbuild/api.py", line 51, in build_wheel
          project = AbstractProject.bootstrap('pep517')
        File "/private/var/folders/j_/0h809bz57qgdkgx3299vt3jh0000gn/T/pip-build-env-0hz777qt/overlay/lib/python3.10/site-packages/sipbuild/abstract_project.py", line 83, in bootstrap
          project.setup(pyproject, tool, tool_description)
        File "/private/var/folders/j_/0h809bz57qgdkgx3299vt3jh0000gn/T/pip-build-env-0hz777qt/overlay/lib/python3.10/site-packages/sipbuild/project.py", line 594, in setup
          self.apply_user_defaults(tool)
        File "/private/var/folders/j_/0h809bz57qgdkgx3299vt3jh0000gn/T/pip-install-652wocvg/pyqt5_8cb0d91c53bd4b9293156fad68e175f5/project.py", line 63, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "/private/var/folders/j_/0h809bz57qgdkgx3299vt3jh0000gn/T/pip-build-env-0hz777qt/overlay/lib/python3.10/site-packages/pyqtbuild/project.py", line 70, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "/private/var/folders/j_/0h809bz57qgdkgx3299vt3jh0000gn/T/pip-build-env-0hz777qt/overlay/lib/python3.10/site-packages/sipbuild/project.py", line 241, in apply_user_defaults
          self.builder.apply_user_defaults(tool)
        File "/private/var/folders/j_/0h809bz57qgdkgx3299vt3jh0000gn/T/pip-build-env-0hz777qt/overlay/lib/python3.10/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.

Ubuntu 20.24 (Python 3.10.2 / pip 20.0.3) :

Defaulting to user installation because normal site-packages is not writeable
Collecting pyqt5
  Using cached PyQt5-5.15.6.tar.gz (3.2 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [134 lines of output]
      Collecting sip<7,>=6.4
        Using cached sip-6.5.1.tar.gz (1.2 MB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'done'
      Collecting PyQt-builder<2,>=1.9
        Using cached PyQt_builder-1.12.2-py3-none-any.whl (5.6 MB)
      Collecting setuptools
        Using cached setuptools-60.9.3-py3-none-any.whl (1.1 MB)
      Collecting packaging
        Using cached packaging-21.3-py3-none-any.whl (40 kB)
      Collecting toml
        Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
      Collecting pyparsing!=3.0.5,>=2.0.2
        Using cached pyparsing-3.0.7-py3-none-any.whl (98 kB)
      Building wheels for collected packages: sip
        Building wheel for sip (pyproject.toml): started
        Building wheel for sip (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error
      
        × Building wheel for sip (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [102 lines of output]
            running bdist_wheel
            running build
            running build_py
            creating build
            creating build/lib.linux-aarch64-3.10
            creating build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/bindings.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/installable.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/distutils_builder.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/pyproject.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/abstract_builder.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/py_versions.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/builder.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/configurable.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/__init__.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/api.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/argument_parser.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/abstract_project.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/project.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/buildable.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/version.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/helpers.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/setuptools_builder.py -> build/lib.linux-aarch64-3.10/sipbuild
            copying sipbuild/exceptions.py -> build/lib.linux-aarch64-3.10/sipbuild
            creating build/lib.linux-aarch64-3.10/sipbuild/distinfo
            copying sipbuild/distinfo/distinfo.py -> build/lib.linux-aarch64-3.10/sipbuild/distinfo
            copying sipbuild/distinfo/__init__.py -> build/lib.linux-aarch64-3.10/sipbuild/distinfo
            copying sipbuild/distinfo/main.py -> build/lib.linux-aarch64-3.10/sipbuild/distinfo
            creating build/lib.linux-aarch64-3.10/sipbuild/tools
            copying sipbuild/tools/sdist.py -> build/lib.linux-aarch64-3.10/sipbuild/tools
            copying sipbuild/tools/build.py -> build/lib.linux-aarch64-3.10/sipbuild/tools
            copying sipbuild/tools/wheel.py -> build/lib.linux-aarch64-3.10/sipbuild/tools
            copying sipbuild/tools/__init__.py -> build/lib.linux-aarch64-3.10/sipbuild/tools
            copying sipbuild/tools/install.py -> build/lib.linux-aarch64-3.10/sipbuild/tools
            creating build/lib.linux-aarch64-3.10/sipbuild/module
            copying sipbuild/module/__init__.py -> build/lib.linux-aarch64-3.10/sipbuild/module
            copying sipbuild/module/main.py -> build/lib.linux-aarch64-3.10/sipbuild/module
            copying sipbuild/module/abi_version.py -> build/lib.linux-aarch64-3.10/sipbuild/module
            copying sipbuild/module/module.py -> build/lib.linux-aarch64-3.10/sipbuild/module
            creating build/lib.linux-aarch64-3.10/sipbuild/module/source
            creating build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/voidptr.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/sipint.h -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/sip.h.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/README.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/array.h -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/sip.rst.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/sip.pyi -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/LICENSE-GPL3 -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/LICENSE-GPL2 -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/MANIFEST.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/array.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/LICENSE -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/pyproject.toml -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/setup.cfg.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/bool.cpp -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/objmap.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/siplib.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/int_convertors.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/descriptors.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/setup.py.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            copying sipbuild/module/source/13/threads.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
            creating build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/voidptr.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/sipint.h -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/sip.h.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/README.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/array.h -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/sip.rst.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/sip.pyi -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/LICENSE-GPL3 -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/LICENSE-GPL2 -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/MANIFEST.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/array.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/LICENSE -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/apiversions.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/pyproject.toml -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/qtlib.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/setup.cfg.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/bool.cpp -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/objmap.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/siplib.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/int_convertors.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/descriptors.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/setup.py.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            copying sipbuild/module/source/12/threads.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
            running build_ext
            building 'sipbuild.code_generator' extension
            creating build/temp.linux-aarch64-3.10
            creating build/temp.linux-aarch64-3.10/code_generator
            aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.10 -I/usr/local/include/python3.10 -c code_generator/export.c -o build/temp.linux-aarch64-3.10/code_generator/export.o
            aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.10 -I/usr/local/include/python3.10 -c code_generator/extracts.c -o build/temp.linux-aarch64-3.10/code_generator/extracts.o
            aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.10 -I/usr/local/include/python3.10 -c code_generator/gencode.c -o build/temp.linux-aarch64-3.10/code_generator/gencode.o
            aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.10 -I/usr/local/include/python3.10 -c code_generator/heap.c -o build/temp.linux-aarch64-3.10/code_generator/heap.o
            aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.10 -I/usr/local/include/python3.10 -c code_generator/lexer.c -o build/temp.linux-aarch64-3.10/code_generator/lexer.o
            aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.10 -I/usr/local/include/python3.10 -c code_generator/parser.c -o build/temp.linux-aarch64-3.10/code_generator/parser.o
            aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.10 -I/usr/local/include/python3.10 -c code_generator/pybinding.c -o build/temp.linux-aarch64-3.10/code_generator/pybinding.o
            code_generator/pybinding.c:30:10: fatal error: Python.h: No such file or directory
               30 | #include <Python.h>
                  |          ^~~~~~~~~~
            compilation terminated.
            error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1
            [end of output]
      
        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for sip
      Failed to build sip
      ERROR: Could not build wheels for sip, which is required to install pyproject.toml-based projects
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Stack Overflow refuses to let me post this with so much code so I'll just add something on the end. The entire context is already present so there shouldn't be anything to add, but I am forced to.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文