JetsonNanoにpygameをインストールを試みるもエラー（ WARNING, No "Setup" File Exists, Running "buildconfig/config.py"    Using UNIX configuration...）

`pip3 install pygame`でエラー

```
# pip3 install pygame
WARNING: The directory '/home/jetson/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pygame
  Downloading pygame-2.0.0.tar.gz (5.5 MB)
     |████████████████████████████████| 5.5 MB 1.0 MB/s 
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ass_gzm2/pygame/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ass_gzm2/pygame/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-54pki2ce
         cwd: /tmp/pip-install-ass_gzm2/pygame/
    Complete output (29 lines):
    
    
    WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
    Using UNIX configuration...
    
    /bin/sh: 1: sdl2-config: not found
    /bin/sh: 1: sdl2-config: not found
    /bin/sh: 1: sdl2-config: not found
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-ass_gzm2/pygame/setup.py", line 318, in <module>
        buildconfig.config.main(AUTO_CONFIG)
      File "/tmp/pip-install-ass_gzm2/pygame/buildconfig/config.py", line 221, in main
        deps = CFG.main(**kwds)
      File "/tmp/pip-install-ass_gzm2/pygame/buildconfig/config_unix.py", line 194, in main
        DependencyProg('SDL', 'SDL_CONFIG', 'sdl2-config', '2.0', ['sdl']),
      File "/tmp/pip-install-ass_gzm2/pygame/buildconfig/config_unix.py", line 39, in __init__
        self.ver = config[0].strip()
    IndexError: list index out of range
    
    Hunting dependencies...
    
    ---
    For help with compilation see:
        https://www.pygame.org/wiki/CompileUbuntu
    To contribute to pygame development see:
        https://www.pygame.org/contribute.html
    ---
    
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

```

以下手順でインストールできた

```
apt-get update -y
apt-get install -y libsdl-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev
apt-get install -y libsmpeg-dev libportmidi-dev bavformat-dev libswscale-dev
apt-get install -y libfreetype6-dev
apt-get install -y libportmidi-dev
pip3 install pgzero
```

# 参考
[Installing Pygame Zero](https://pygame-zero.readthedocs.io/en/1.0.2/installation.html?highlight=python)
[Jetson Nanoにpygameをインストールする方法（Python2/Python3）](https://qiita.com/karaage0703/items/5d43309bc688858e7c2a)
[赤ちゃんをJetson NanoのエッジAIにも見守ってもらう④ - LINEからJetson Nano操作 -](http://hituji-ws.com/code/python/babymonitorai4/)
[pygame-no-setup-file-exists-running-buildconfig-config-py](https://stackoverflow.com/questions/64311396/pygame-no-setup-file-exists-running-buildconfig-config-py)
[pygameのインストール](https://riptutorial.com/ja/pygame/example/16814/pygame%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB)