holzschu / Carnets

Carnets is a stand-alone Jupyter notebook server and client. Edit your notebooks on the go, even where there is no network.
https://holzschu.github.io/Carnets_Jupyter/
BSD 3-Clause "New" or "Revised" License
567 stars 33 forks source link

Install pygame is error #278

Open XiuJie2 opened 1 year ago

XiuJie2 commented 1 year ago

Defaulting to user installation because normal site-packages is not writeable Collecting pygame Using cached pygame-2.1.2.tar.gz (10.1 MB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'error'

error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [31 lines of output]

  WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
  Using Darwin configuration...

  sdl2-config: command not found
  sdl2-config: command not found
  sdl2-config: command not found

  ---
  For help with compilation see:
      https://www.pygame.org/wiki/MacCompile
  To contribute to pygame development see:
      https://www.pygame.org/contribute.html
  ---

  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/private/var/mobile/Containers/Data/Application/B78B42A1-5E8F-414E-8315-0DBB52B6DC65/tmp/pip-install-k37u73jt/pygame_add4859022bd463d97ebc8475508d9d9/setup.py", line 359, in <module>
      buildconfig.config.main(AUTO_CONFIG)
    File "/private/var/mobile/Containers/Data/Application/B78B42A1-5E8F-414E-8315-0DBB52B6DC65/tmp/pip-install-k37u73jt/pygame_add4859022bd463d97ebc8475508d9d9/buildconfig/config.py", line 225, in main
      deps = CFG.main(**kwds)
             ^^^^^^^^^^^^^^^^
    File "/private/var/mobile/Containers/Data/Application/B78B42A1-5E8F-414E-8315-0DBB52B6DC65/tmp/pip-install-k37u73jt/pygame_add4859022bd463d97ebc8475508d9d9/buildconfig/config_darwin.py", line 132, in main
      [DependencyProg('SDL', 'SDL_CONFIG', 'sdl2-config', '2.0', ['sdl'])],
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/private/var/mobile/Containers/Data/Application/B78B42A1-5E8F-414E-8315-0DBB52B6DC65/tmp/pip-install-k37u73jt/pygame_add4859022bd463d97ebc8475508d9d9/buildconfig/config_unix.py", line 39, in __init__
      self.ver = config[0].strip()
                 ~~~~~~^^^
  IndexError: list index out of range
  [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.

holzschu commented 1 year ago

Yes, pygame has components written in C, and relies on the SDL library which is also written in C. Since there are no C compilers available on iOS, it cannot be installed on Carnets (only pure Python packages can be installed).

XiuJie2 commented 1 year ago

Please tell me how to solve this problem🥹> Yes, pygame has components written in C, and relies on the SDL library which is also written in C. Since there are no C compilers available on iOS, it cannot be installed on Carnets (only pure Python packages can be installed).

holzschu commented 1 year ago

I don't have a solution for this.

XiuJie2 commented 1 year ago

I don't have a solution for this.

Thank you for your reply