无法安装 Pygame M1 Mac Python3.9.5

时间:2021-07-02 02:30:21

标签: python python-3.x pygame

我最近买了一台新的 M1 macbook(不确定是不是这个问题),我一直在尝试重新安装我曾经拥有的所有 python 模块,但我在安装 pygame 时遇到了这个问题。我没有足够的经验来理解此错误消息中的所有内容,但是自从我尝试 brew install python3 以来它已经发生了变化,现在它给了我这个稍微不同且更长的错误消息。 有没有手动安装pygame而不是通过pip的方法? 我应该删除并重新安装python3吗?

感谢任何帮助:)

Collecting pygame
  Using cached pygame-2.0.1.tar.gz (5.5 MB)
    ERROR: Command errored out with exit status 1:
     command: /opt/homebrew/opt/python@3.9/bin/python3.9 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-install-vkfl6s_j/pygame_cf10030a6ad6418899f6c1110dbfe7b2/setup.py'"'"'; __file__='"'"'/private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-install-vkfl6s_j/pygame_cf10030a6ad6418899f6c1110dbfe7b2/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-pip-egg-info-5pofrvd5
         cwd: /private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-install-vkfl6s_j/pygame_cf10030a6ad6418899f6c1110dbfe7b2/
    Complete output (27 lines):
    
    
    WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
    Using Darwin configuration...
    
    /bin/sh: sdl2-config: command not found
    /bin/sh: sdl2-config: command not found
    /bin/sh: sdl2-config: command not found
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-install-vkfl6s_j/pygame_cf10030a6ad6418899f6c1110dbfe7b2/setup.py", line 318, in <module>
        buildconfig.config.main(AUTO_CONFIG)
      File "/private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-install-vkfl6s_j/pygame_cf10030a6ad6418899f6c1110dbfe7b2/buildconfig/config.py", line 221, in main
        deps = CFG.main(**kwds)
      File "/private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-install-vkfl6s_j/pygame_cf10030a6ad6418899f6c1110dbfe7b2/buildconfig/config_darwin.py", line 131, in main
        [DependencyProg('SDL', 'SDL_CONFIG', 'sdl2-config', '2.0', ['sdl'])],
      File "/private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-install-vkfl6s_j/pygame_cf10030a6ad6418899f6c1110dbfe7b2/buildconfig/config_unix.py", line 39, in __init__
        self.ver = config[0].strip()
    IndexError: list index out of range
    
    ---
    For help with compilation see:
        https://www.pygame.org/wiki/MacCompile
    To contribute to pygame development see:
        https://www.pygame.org/contribute.html
    ---
    
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/c7/b8/06e02c7cca7aec915839927a9aa19f749ac17a3d2bb2610b945d2de0aa96/pygame-2.0.1.tar.gz#sha256=8b1e7b63f47aafcdd8849933b206778747ef1802bd3d526aca45ed77141e4001 (from https://pypi.org/simple/pygame/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached pygame-2.0.0.tar.gz (5.5 MB)
    ERROR: Command errored out with exit status 1:
     command: /opt/homebrew/opt/python@3.9/bin/python3.9 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-install-vkfl6s_j/pygame_427da6222c7f4bc984379aeddccc2fcc/setup.py'"'"'; __file__='"'"'/private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-install-vkfl6s_j/pygame_427da6222c7f4bc984379aeddccc2fcc/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-pip-egg-info-dr744fiw
         cwd: /private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-install-vkfl6s_j/pygame_427da6222c7f4bc984379aeddccc2fcc/
    Complete output (27 lines):
    
    
    WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
    Using Darwin configuration...
    
    /bin/sh: sdl2-config: command not found
    /bin/sh: sdl2-config: command not found
    /bin/sh: sdl2-config: command not found
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-install-vkfl6s_j/pygame_427da6222c7f4bc984379aeddccc2fcc/setup.py", line 318, in <module>
        buildconfig.config.main(AUTO_CONFIG)
      File "/private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-install-vkfl6s_j/pygame_427da6222c7f4bc984379aeddccc2fcc/buildconfig/config.py", line 221, in main
        deps = CFG.main(**kwds)
      File "/private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-install-vkfl6s_j/pygame_427da6222c7f4bc984379aeddccc2fcc/buildconfig/config_darwin.py", line 131, in main
        [DependencyProg('SDL', 'SDL_CONFIG', 'sdl2-config', '2.0', ['sdl'])],
      File "/private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-install-vkfl6s_j/pygame_427da6222c7f4bc984379aeddccc2fcc/buildconfig/config_unix.py", line 39, in __init__
        self.ver = config[0].strip()
    IndexError: list index out of range
    
    ---
    For help with compilation see:
        https://www.pygame.org/wiki/MacCompile
    To contribute to pygame development see:
        https://www.pygame.org/contribute.html
    ---
    
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/bc/0c/d164411381bada8feae57359aa9296defbed3035f4b55bef6a271cb0573c/pygame-2.0.0.tar.gz#sha256=63b038da116a643046181b02173fd894d87d2f85ecfd6aa7d5ece73c6ef501e9 (from https://pypi.org/simple/pygame/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached pygame-1.9.6.tar.gz (3.2 MB)
Building wheels for collected packages: pygame
  Building wheel for pygame (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /opt/homebrew/opt/python@3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-install-vkfl6s_j/pygame_0489b6bfab804e9e86027744ac1a2b54/setup.py'"'"'; __file__='"'"'/private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-install-vkfl6s_j/pygame_0489b6bfab804e9e86027744ac1a2b54/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-wheel-m_eb4hxk
       cwd: /private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-install-vkfl6s_j/pygame_0489b6bfab804e9e86027744ac1a2b54/
  Complete output (217 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-11-arm64-3.9
  creating build/lib.macosx-11-arm64-3.9/pygame
  copying src_py/surfarray.py -> build/lib.macosx-11-arm64-3.9/pygame
  copying src_py/sysfont.py -> build/lib.macosx-11-arm64-3.9/pygame
  copying src_py/_camera_vidcapture.py -> build/lib.macosx-11-arm64-3.9/pygame3.9/pygame/examples
  copying examples/glcube.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
  copying examples/aliens.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
  copying examples/freetype_misc.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
  copying examples/scaletest.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
  copying examples/video.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
  copying examples/eventlist.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
  copying examples/scrap_clipboard.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
  copying examples/oldalien.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
  copying examples/pixelarray.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
  copying examples/dropevent.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
  running build_ext
  building 'pygame.gfxdraw' extension
  creating build/temp.macosx-11-arm64-3.9
  creating build/temp.macosx-11-arm64-3.9/src_c
  creating build/temp.macosx-11-arm64-3.9/src_c/SDL_gfx
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -DENABLE_NEWBUF=1 -I/NEED_INC_PATH_FIX -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src_c/SDL_gfx/SDL_gfxPrimitives.c -o build/temp.macosx-11-arm64-3.9/src_c/SDL_gfx/SDL_gfxPrimitives.o
  In file included from src_c/SDL_gfx/SDL_gfxPrimitives.c:14:
  src_c/SDL_gfx/SDL_gfxPrimitives.h:17:10: fatal error: 'SDL.h' file not found
  #include "SDL.h"
           ^~~~~~~
  1 error generated.
  ---
  For help with compilation see:
      https://www.pygame.org/wiki/MacCompile
  To contribute to pygame development see:
      https://www.pygame.org/contribute.html
  ---
  error: command '/usr/bin/clang' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for pygame
  Running setup.py clean for pygame
Failed to build pygame
Installing collected packages: pygame
    Running setup.py install for pygame ... error
    ERROR: Command errored out with exit status 1:
     command: /opt/homebrew/opt/python@3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-install-vkfl6s_j/pygame_0489b6bfab804e9e86027744ac1a2b54/setup.py'"'"'; __file__='"'"'/private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-install-vkfl6s_j/pygame_0489b6bfab804e9e86027744ac1a2b54/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-record-cir2worn/install-record.txt --single-version-externally-managed --compile --install-headers /opt/homebrew/include/python3.9/pygame
         cwd: /private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-install-vkfl6s_j/pygame_0489b6bfab804e9e86027744ac1a2b54/
    Complete output (217 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-11-arm64-3.9
    creating build/lib.macosx-11-arm64-3.9/pygame
    copying src_py/surfarray.py -> build/lib.macosx-11-arm64-3.9/pygame
    copying src_py/sysfont.py -> build/lib.macosx-11-arm64-3.9/pygame
    copying src_py/_camera_vidcapture.py -> build/lib.macosx-11-arm64-3.9/pygame
    copying src_py/sndarray.py -> build/lib.macosx-11-arm64-3.9/pygame
    copying src_py/version.py -> build/lib.macosx-11-arm64-3.9/pygame
    copying test/run_tests__tests/failures1/fake_4_test.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/failures1
    creating build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/incomplete
    copying test/run_tests__tests/incomplete/fake_3_test.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/incomplete
    copying test/run_tests__tests/incomplete/fake_2_test.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/incomplete
    copying test/run_tests__tests/incomplete/__init__.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/incomplete
    creating build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/infinite_loop
    copying test/run_tests__tests/infinite_loop/fake_2_test.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/infinite_loop
    copying test/run_tests__tests/infinite_loop/fake_1_test.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/infinite_loop
    copying test/run_tests__tests/infinite_loop/__init__.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/infinite_loop
    creating build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/print_stderr
    copying test/run_tests__tests/print_stderr/fake_3_test.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/print_stderr
    copying test/run_tests__tests/print_stderr/fake_2_test.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/print_stderr
    copying test/run_tests__tests/print_stderr/__init__.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/print_stderr
    copying test/run_tests__tests/print_stderr/fake_4_test.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/print_stderr
    creating build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/print_stdout
    copying test/run_tests__tests/print_stdout/fake_3_test.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/print_stdout
    copying test/run_tests__tests/print_stdout/fake_2_test.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/print_stdout
    copying test/run_tests__tests/print_stdout/__init__.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/print_stdout
    copying test/run_tests__tests/print_stdout/fake_4_test.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/print_stdout
    creating build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/incomplete_todo
    copying test/run_tests__tests/incomplete_todo/fake_3_test.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/incomplete_todo
    copying test/run_tests__tests/incomplete_todo/fake_2_test.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/incomplete_todo
    copying test/run_tests__tests/incomplete_todo/__init__.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/incomplete_todo
    creating build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/exclude
    copying test/run_tests__tests/exclude/magic_tag_test.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/exclude
    copying test/run_tests__tests/exclude/fake_2_test.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/exclude
    copying test/run_tests__tests/exclude/__init__.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/exclude
    copying test/run_tests__tests/exclude/invisible_tag_test.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/exclude
    creating build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/timeout
    copying test/run_tests__tests/timeout/sleep_test.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/timeout
    copying test/run_tests__tests/timeout/fake_2_test.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/timeout
    copying test/run_tests__tests/timeout/__init__.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/timeout
    creating build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/everything
    copying test/run_tests__tests/everything/sleep_test.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/everything
    copying test/run_tests__tests/everything/magic_tag_test.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/everything
    copying test/run_tests__tests/everything/fake_2_test.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/everything
    copying test/run_tests__tests/everything/incomplete_todo_test.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/everything
    copying test/run_tests__tests/everything/__init__.py -> build/lib.macosx-11-arm64-3.9/pygame/tests/run_tests__tests/everything
    creating build/lib.macosx-11-arm64-3.9/pygame/docs
    copying docs/__init__.py -> build/lib.macosx-11-arm64-3.9/pygame/docs
    copying docs/__main__.py -> build/lib.macosx-11-arm64-3.9/pygame/docs
    creating build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/playmus.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/mask.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/sound.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/overlay.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/aacircle.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/chimp.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/liquid.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/audiocapture.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/sound_array_demos.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/midi.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/scroll.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/cursors.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/moveit.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/__init__.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/blit_blends.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/testsprite.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/textinput.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/vgrade.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/arraydemo.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/stars.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/camera.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/blend_fill.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/fonty.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/headless_no_windows_needed.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/fastevents.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/prevent_display_stretching.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/glcube.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/aliens.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/freetype_misc.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/scaletest.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/video.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/eventlist.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/scrap_clipboard.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/oldalien.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/pixelarray.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    copying examples/dropevent.py -> build/lib.macosx-11-arm64-3.9/pygame/examples
    running build_ext
    building 'pygame.gfxdraw' extension
    creating build/temp.macosx-11-arm64-3.9
    creating build/temp.macosx-11-arm64-3.9/src_c
    creating build/temp.macosx-11-arm64-3.9/src_c/SDL_gfx
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -DENABLE_NEWBUF=1 -I/NEED_INC_PATH_FIX -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src_c/SDL_gfx/SDL_gfxPrimitives.c -o build/temp.macosx-11-arm64-3.9/src_c/SDL_gfx/SDL_gfxPrimitives.o
    In file included from src_c/SDL_gfx/SDL_gfxPrimitives.c:14:
    src_c/SDL_gfx/SDL_gfxPrimitives.h:17:10: fatal error: 'SDL.h' file not found
    #include "SDL.h"
             ^~~~~~~
    1 error generated.
    ---
    For help with compilation see:
        https://www.pygame.org/wiki/MacCompile
    To contribute to pygame development see:
        https://www.pygame.org/contribute.html
    ---
    error: command '/usr/bin/clang' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /opt/homebrew/opt/python@3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-install-vkfl6s_j/pygame_0489b6bfab804e9e86027744ac1a2b54/setup.py'"'"'; __file__='"'"'/private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-install-vkfl6s_j/pygame_0489b6bfab804e9e86027744ac1a2b54/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/dp/frsh57_n7p11h7dn76jgyy7w0000gn/T/pip-record-cir2worn/install-record.txt --single-version-externally-managed --compile --install-headers /opt/homebrew/include/python3.9/pygame Check the logs for full command output.
WARNING: You are using pip version 21.1.1; however, version 21.1.3 is available.
You should consider upgrading via the '/opt/homebrew/opt/python@3.9/bin/python3.9 -m pip install --upgrade pip' command.

0 个答案:

没有答案