Error when running prereqs file for ubuntu

Hello,

I am going through the guide for setting up the build environment for linux/ubuntu. And I get an error regarding pygame when I run the script /install-prereqs-ubuntu.sh…

I am not able to install pygame using pip either. Does anyone have any clue to what I might be missing?

Thanks,

krisaue

Hardware: Nvidia Jetson Nano
Software: Ubuntu 18.04

ERROR OUTPUT:

Collecting pygame

Using cached pygame-2.0.1.tar.gz (5.5 MB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-fgwv7W/pygame/setup.py’"’"’; file=’"’"’/tmp/pip-install-fgwv7W/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-_Pj2qA
cwd: /tmp/pip-install-fgwv7W/pygame/
Complete output (29 lines):

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

sh: 1: sdl2-config: not found
sh: 1: sdl2-config: not found
sh: 1: sdl2-config: not found

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
---

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-fgwv7W/pygame/setup.py", line 318, in <module>
    buildconfig.config.main(AUTO_CONFIG)
  File "buildconfig/config.py", line 221, in main
    deps = CFG.main(**kwds)
  File "buildconfig/config_unix.py", line 194, in main
    DependencyProg('SDL', 'SDL_CONFIG', 'sdl2-config', '2.0', ['sdl']),
  File "buildconfig/config_unix.py", line 39, in __init__
    self.ver = config[0].strip()
IndexError: list index out of range
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

After installing the dependencies found here: https://www.pygame.org/wiki/CompileUbuntu it worked.